Boost logo

Boost Users :

From: Trigve Siver (trigves_at_[hidden])
Date: 2007-05-17 15:11:36


>----- Original Message ----
>From: Arkadiy Vertleyb <vertleyb_at_[hidden]>
>To: boost-users_at_[hidden]
>Sent: Thursday, May 17, 2007 8:39:19 PM
>Subject: Re: [Boost-users] fatal error C1001 with visual studio 8, boost 1.34, BOOST_AUTO() macro
>
>"Trigve Siver" <trigves_at_[hidden]> wrote
>
>> ---
>> typedef BOOST_TYPEOF(T.exec("SELECT 1")) type; // OK
>> type rs; // fatal error
>> ---
>
>So, it seems to be able to deduce the type, but can't use it? I've never
>seen anything like this... Is it possible to get the name of the type:
>
>#include <typeinfo.h>
>cout << typeid(type).name();
>
>or is it also "fatal error"?

std::cout << typeid(type).name(); // fatal error

>Also, if you define your own free function returning the same type, with no
>parameters, can BOOST_AUTO handle it? With one parameter? A member
>function with zero or one parameters?
>with zero or one paramters it works ok

---
class A
{
public:
    pqxx::result test(int a)
    {
        return pqxx::result();
    }
    pqxx::result test1(void)
    {
        return pqxx::result();
    }
};
pqxx::result test(void)
{
    return pqxx::result();
}
pqxx::result test1(void)
{
    return pqxx::result();
}
int main(int argc, char* argv[])
{
    pqxx::connection connection("host=...");
    pqxx::nontransaction T(connection, "GetCustomer");
//    typedef BOOST_TYPEOF(T.exec("SELECT 1")) type; // OK
    BOOST_AUTO(rs, test()); // OK
    BOOST_AUTO(rs, test1()); // ok
    A a;
    BOOST_AUTO(rs, a.test(1)); // OK
    BOOST_AUTO(rs, a.test1()); // ok
...
}
---
>What exact version of the compiler are you using?  Is it Microsoft Visual 
>C++ 2005?
>
Microsoft Visual Studio 2005
Version 8.0.50727.762  (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual Basic 2005   77626-009-1424494-41887
Microsoft Visual Basic 2005
Microsoft Visual C# 2005   77626-009-1424494-41887
Microsoft Visual C# 2005
Microsoft Visual C++ 2005   77626-009-1424494-41887
Microsoft Visual C++ 2005
Microsoft Visual J# 2005   77626-009-1424494-41887
Microsoft Visual J# 2005
Microsoft Visual Web Developer 2005   77626-009-1424494-41887
Microsoft Visual Web Developer 2005
Microsoft Web Application Projects 2005   77626-009-1424494-41887
Microsoft Web Application Projects 2005
Version 8.0.50727.762
Crystal Reports    AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)   
This service pack is for Microsoft Visual Studio 2005 Professional Edition - ENU. 
If you later install a more recent service pack, this service pack will be uninstalled automatically. 
For more information, visit http://support.microsoft.com/kb/926601
Visual Assist X   
For more information about Visual Assist, see the Whole Tomato Software website at http://www.WholeTomato.com. Copyright (c) 1997-2007 Whole Tomato Software,  Inc.
>Regards,
>Arkadiy 
Thanks
Trigve
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
      ____________________________________________________________________________________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