MySQL C++ API and Visual Studio 2005 beta
Posted by: Roger Garrett
Date: June 21, 2005 09:19AM

I'm trying to compile the MySQL C++ API using the latest Visual Studio 2005 beta, and I'm getting tons of errors and warnings (due to the compiler now conforming to the ISO C++ Standard, which breaks many things in old code).

In particular, the following code (in the set1.hh file):

template <class T>
inline MysqlSetInsert<set<T> > set_insert(set<T> *o) {
return MysqlSetInsert<set<T> >(o);
}

causes a warning and an error:


warning C4346: 'std::set<T>::key_type' : dependent name is not a type

error C2923: 'MysqlSetInsert' : 'std::set<T>::key_type' is not a valid template type argument for parameter 'key_type'


Since I've never worked with templates, I don't know what that warning and error is telling me. The documentation for them gave some clues, but my attempts at correcting the problems have not been sucessful.

Does anyone have an idea as to how the above code needs to be changed to make it compile (i.e. conform to the latest ISO standard)?

Any help will be appreciated.

- Roger Garrett

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL C++ API and Visual Studio 2005 beta
1029
June 21, 2005 09:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.