Thread overview
internal error 3726..
Jan 21, 2003
Mike Comperchio
Jan 21, 2003
Walter
Jan 21, 2003
Mike Comperchio
Jan 22, 2003
Walter
January 21, 2003
any help on what might cause this???

TIA
Michael.


January 21, 2003
See www.digitalmars.com/bugs.html


"Mike Comperchio" <mcmprch@adelphia.net> wrote in message news:b0jcpr$2hnp$1@digitaldaemon.com...
> any help on what might cause this???
>
> TIA
> Michael.
>
>


January 21, 2003
Ok, I can isolate it down to a specific function. If needed I can include all the header files as well as the complete source....

I have a class declared in Fields.h as:
//: A vector of FieldInfos, with some extra utility methods.
class Fields : public std::vector<FieldInfo>
{
public:
  Fields();
  explicit Fields(MYSQL_RES* pResult, bool bFullFieldInfo = false);
  //bFullFieldInfo: Some MYSQL_RES members are random unless the result
comes from mysql_list_fields().

  Fields(const Fields& src);
  virtual ~Fields();

  Fields& operator=(const Fields& src);

  //: Returns the field with an offset of i;
  const FieldInfo& operator [] (size_type i) const;
  const FieldInfo& operator [] (const std::string& strFieldName) const ;

  size_type get_index(const std::string& strFieldName) const ;

  bool get_PrimaryKey(size_type& i) const; //bool indicates success.

protected:
  typedef std::vector<FieldInfo> type_base;
};

and in the implementation fields.cc

const FieldInfo& Fields::operator [] (size_type i) const
{
  return type_base::operator[](i);
}

const FieldInfo& Fields::operator [] (const std::string& strFieldName) const
{
  return operator[](get_index(strFieldName));
}

//////////////// if I #define this out the file compiles fine. //////////////// other wise i get the template 3726 error

Fields::size_type Fields::get_index(const std::string& strFieldName) const
{
  //string temp(strFieldName);
  //str_to_lwr(temp);

  FieldInfo result;

  for(size_type i = 0; i < size(); i++)
  {
    const FieldInfo& fieldInfo = operator[](i);
    if(fieldInfo.get_Name() == strFieldName)
      return i;
  }

  throw ex_base("field name not found: " + strFieldName);
  return 0;
}



"Walter" <walter@digitalmars.com> wrote in message news:b0k682$30ra$1@digitaldaemon.com...
> See www.digitalmars.com/bugs.html
>
>
> "Mike Comperchio" <mcmprch@adelphia.net> wrote in message news:b0jcpr$2hnp$1@digitaldaemon.com...
> > any help on what might cause this???
> >
> > TIA
> > Michael.
> >
> >
>
>


January 22, 2003
I need a complete compilable example. There is always the chance that the bug isn't in the code fragment presented (although it may appear to be), and it takes a lot of time trying to flesh it out into a compilable example.

Thanks, -Walter