www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - internal error 3726..

↑ ↓ ← "Mike Comperchio" <mcmprch adelphia.net> writes:
any help on what might cause this???

TIA
Michael.
Jan 21 2003
↑ ↓ "Walter" <walter digitalmars.com> writes:
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.

Jan 21 2003
↑ ↓ "Mike Comperchio" <mcmprch adelphia.net> writes:
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.


Jan 21 2003
↑ ↓ → "Walter" <walter digitalmars.com> writes:
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
Jan 21 2003