************************************************** ****************
I am compiling a librarry which has a .h file containing th
following:
************************************************** ****************
template<typename T> void from_string(const char Str[], T &Obj);
template<> void from_string(const char Str[], long &); //[t45]
template<> void from_string(const char Str[], unsigned lon
&); //[t45]
template<> void from_string(const char Str[], int &); //[t45]
template<> void from_string(const char Str[], unsigned in
&); //[t45]
template<> void from_string(const char Str[], short &); //[t45]
template<> void from_string(const char Str[], unsigned shor
&); //[t45]
template<> void from_string(const char Str[], float &); //[t46]
template<> void from_string(const char Str[], double &); //[t46]
template<> void from_string(const char Str[], long double &); //[t46]
template<> void from_string(const char Str[], bool &); //[t76]
template<> inline void from_string(const char Str[],PGSTD::strin
&Obj) //[t46]
{ Obj = Str; }
template<typename T>
inline void from_string(const PGSTD::string &Str, T &Obj) //[t45]
{ from_string(Str.c_str(), Obj); }
template<> inline void
from_string(const PGSTD::string &Str, PGSTD::string &Obj) //[t46]
{ Obj = Str; }
template<> inline void
from_string(const PGSTD::string &, const signed char &Obj)
{ error_ambiguous_string_conversion(Obj); }
template<> inline void
from_string(const PGSTD::string &, const unsigned char &Obj)
{ error_ambiguous_string_conversion(Obj); }
************************************************** ****************
I am however getting the following errors at compile time:
************************************************** ****************
../include\pqxx/util.hxx(111) : error C2912: explicit specialization
'void __cdecl pqxx::from_string(const clas
std::basic_string<char,struct std::char_traits<char>,clas
std::allocator<char> > &,const signed char &)' is not a functio
template
../include\pqxx/util.hxx(110) : see declaration of 'from_string'
../include\pqxx/util.hxx(111) : error C2912: explicit specialization
'void __cdecl pqxx::from_string(const clas
std::basic_string<char,struct std::char_traits<char>,clas
std::allocator<char> > &,const signed char &)' is not a functio
template
../include\pqxx/util.hxx(110) : see declaration of 'from_string'
../include\pqxx/util.hxx(114) : error C2912: explicit specialization
'void __cdecl pqxx::from_string(const clas
std::basic_string<char,struct std::char_traits<char>,clas
std::allocator<char> > &,const unsigned char &)' is not a function
template
../include\pqxx/util.hxx(113) : see declaration of 'from_string'
../include\pqxx/util.hxx(114) : error C2912: explicit specialization
'void __cdecl pqxx::from_string(const clas
std::basic_string<char,struct std::char_traits<char>,clas
std::allocator<char> > &,const unsigned char &)' is not a function
template
../include\pqxx/util.hxx(113) : see declaration of 'from_string'
../include\pqxx/util.hxx(322) : error C2265: '<Unknown>' : reference t
a zero-sized array is illegal
../include\pqxx/util.hxx(488) : fatal error C1506: unrecoverable bloc
scoping error
Can someone tell me how to correct this and what it actuallty relate
to?
Thanx;
-
ranges2
-----------------------------------------------------------------------
Posted via
http://www.codecomments.co
-----------------------------------------------------------------------