|
Boost Users : |
From: Trigve Siver (trigves_at_[hidden])
Date: 2007-05-17 17:44:07
>----- Original Message ----
>From: Arkadiy Vertleyb <vertleyb_at_[hidden]>
>To: boost-users_at_[hidden]
>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" <trigves_at_[hidden]> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net