Re: [Boost-users] fatal error C1001 with visual studio 8, boost 1.34, BOOST_AUTO() macro

----- Original Message ---- From: Arkadiy Vertleyb
To: boost-users@lists.boost.org Sent: Thursday, May 17, 2007 9:31:51 PM Subject: Re: [Boost-users] fatal error C1001 with visual studio 8, boost 1.34, BOOST_AUTO() macro "Trigve Siver"
wrote class A { public: pqxx::result test(int a) { return pqxx::result(); } }; int main(int argc, char* argv[]) { BOOST_AUTO(rs, a.test(1)); // OK }
One more experiment -- can you change the function signature to accept char* (or maybe some other string type to exactly match the signature of exec()), and use it passing "SELECT 1" to it?
No problem: --- class A { public: pqxx::result test(const std::string &rString, const std::string &rDesc = std::string()) // fatal error // pqxx::result test(const std::string &rString) // OK { return pqxx::result(); } pqxx::result test1(void) { return pqxx::result(); } }; int main(int argc, char* argv[]) { A a; BOOST_AUTO(rs, a.test("SELECT 1")); // fatal error (when used A::test(const std::string &rString, const std::string &rDesc = std::string())) ... } --- So when I use the first signature (pqxx::result test(const std::string &rString, const std::string &rDesc = std::string()) there is fatal error. Otherwise everything compile OK.
Also, can you call:
cout << typeid(T.exec("SELECT 1")).name() << endl;
and see if it's compiled and what gets output?
std::cout << typeid(T.exec("SELECT 1")).name() << std::endl; Output: class pqxx::result
Regards, Arkadiy
Thanks Trigve ____________________________________________________________________________________Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

Trigve, I strongly suggest you try an identifier other than "T". Arkadiy, I suggest you download and install postgresql so you can reproduce this; it's free. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com Don't Miss BoostCon 2007! ==> http://www.boostcon.com

"David Abrahams"
Arkadiy, I suggest you download and install postgresql so you can reproduce this; it's free.
Apparently the problem is already reproduced without PostgreSQL, but I see your point. The next time I feel the discussion becomes too lengthy I will move it to the private email exchange. Regards, Arkadiy

on Thu May 17 2007, "Arkadiy Vertleyb"
"David Abrahams"
wrote Arkadiy, I suggest you download and install postgresql so you can reproduce this; it's free.
Apparently the problem is already reproduced without PostgreSQL, but I see your point. The next time I feel the discussion becomes too lengthy I will move it to the private email exchange.
That wasn't really my point, but that's OK. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (3)
-
Arkadiy Vertleyb
-
David Abrahams
-
Trigve Siver