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

----- Original Message ---- From: Arkadiy Vertleyb <vertleyb@hotmail.com> To: boost-users@lists.boost.org Sent: Thursday, May 17, 2007 5:05:44 PM Subject: Re: [Boost-users] fatal error C1001 with visual studio 8, boost 1.34, BOOST_AUTO() macro
"Felipe Magno de Almeida" <felipe.m.almeida@gmail.com> wrote
One more question -- what is T? Is it a template parameter of some sort?
pqxx::nontransaction T(*m_pSQLConnection, "GetCustomer");
Strange...
Can you post the entire file where you use BOOST_AUTO (and also the file(s) where you register your types)?
Hi, of course... stadfx.h: --- // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #include <cstdio> #include <pqxx/pqxx> #include <boost/typeof/typeof.hpp> // Register user defined types #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() BOOST_TYPEOF_REGISTER_TYPE(pqxx::result) --- test_boost_auto.cpp file: --- // test_boost_auto.cpp : Defines the entry point for the console application. // #include "stdafx.h" int main(int argc, char* argv[]) { pqxx::connection connection("host=..."); pqxx::nontransaction T(connection, "GetCustomer"); BOOST_AUTO(rs, T.exec("SELECT 1")); // fatal error at this line //1 pqxx::result rs = T.exec("SELECT 1"); //2 BOOST_AUTO(r, rs); return 0; } --- When I uncomment the 1, 2 line, everything is OK (while the fatal error line is commented out). Output from output window: --- ------ Build started: Project: test_boost_auto, Configuration: Debug Win32 ------ Compiling... test_boost_auto.cpp d:\temp\delete\test_boost_auto\test_boost_auto.cpp(11) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 'F:\SP\vctools\compiler\utc\src\P2\main.c[0x10C68EF3:0x00000008]', line 182) To work around this problem, try simplifying or changing the program near the locations listed above. Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Build log was saved at "file://d:\Temp\DELETE\test_boost_auto\Debug\BuildLog.htm" test_boost_auto - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ---
Thanks, Arkadiy
thanks Trigve ____________________________________________________________________________________Give spam the boot. Take control with tough spam protection in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

"Trigve Siver" <trigves@yahoo.com> wrote
Strange...
Can you post the entire file where you use BOOST_AUTO (and also the file(s) where you register your types)?
Hi, of course...
Well, I don't have PostgreSQL, and can't reproduce the situation without it :( So I am going to ask you to try a couple more things. Can you try all of these: 1) typedef BOOST_TYPEOF(T.exec("SELECT 1")) type; 2) boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")); 3) boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")).item0; 4) sizeof(boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")).item0); 5) typedef boost::mpl::size_t<sizeof(boost::type_of::encode<boost::type_of::vector0<>
(T.exec("SELECT 1")).item0)> type;
Which one compiles and which doesn't? Regards, Arkadiy
participants (2)
-
Arkadiy Vertleyb
-
Trigve Siver