Environment: WinXP SP2/Visual Studio Team System 2005/Boost 1.37.0 32-bit Using boost.function in Boost 1.37.0 generates several errors. Compiler extract : 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(80) : error C2143: syntax error : missing ';' before 'namespace' 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(980) : error C2838: '()' : illegal qualified name in member declaration 28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_temp late.hpp(80) : see reference to class template instantiation 'boost::function0<R>' being compiled 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(995) : error C2804: binary 'operator ==' has too many parameters 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(1002) : error C2804: binary 'operator !=' has too many parameters 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(1098) : error C2764: 'R' : template parameter not used or deducible in partial specialization 'boost::function<R(void)>' 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(1098) : error C3412: 'boost::function<R(void)>' : cannot specialize template in current scope 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(90) : error C2061: syntax error : identifier 'function_buffer' 28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_temp late.hpp(96) : see reference to class template instantiation 'boost::boost::detail::function::function_invoker1<FunctionPtr,R,T0>' being compiled 28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_t emplate.hpp(106) : error C2061: syntax error : identifier 'function_buffer' 28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_temp late.hpp(113) : see reference to class template instantiation 'boost::boost::detail::function::void_function_invoker1<FunctionPtr,R,T0
' being compiled
In Boost 1.36.0 the code complies ok. Is it boost function or my code. Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não deverá utilizar, copiar, alterar, divulgar a informação nela contida ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o e-mail e em seguida apague-o. Agradecemos sua cooperação. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, change, take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
Could you possibly send a small reproducer code. Since I have a setup of BOOST 1.37 with MSVC, MinGW and on GNU/Linux, I can test it. -dhruva 2008/12/13 Amit Sonawane <asonawane@bmf.com.br>:
Environment:
WinXP SP2/Visual Studio Team System 2005/Boost 1.37.0 32-bit
Using boost.function in Boost 1.37.0 generates several errors. Compiler extract :
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(80) : error C2143: syntax error : missing ';' before 'namespace'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(980) : error C2838: '()' : illegal qualified name in member declaration
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(80) : see reference to class template instantiation 'boost::function0<R>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(995) : error C2804: binary 'operator ==' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1002) : error C2804: binary 'operator !=' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1098) : error C2764: 'R' : template parameter not used or deducible in partial specialization 'boost::function<R(void)>'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1098) : error C3412: 'boost::function<R(void)>' : cannot specialize template in current scope
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(90) : error C2061: syntax error : identifier 'function_buffer'
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(96) : see reference to class template instantiation 'boost::boost::detail::function::function_invoker1<FunctionPtr,R,T0>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(106) : error C2061: syntax error : identifier 'function_buffer'
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(113) : see reference to class template instantiation 'boost::boost::detail::function::void_function_invoker1<FunctionPtr,R,T0>' being compiled
In Boost 1.36.0 the code complies ok. Is it boost function or my code.
-- Contents reflect my personal views only!
Actually, there is no code to reproduce this. The errors occur within one of the projects which complies ok with boost 1.36.0. I am not yet sure how does boost.function get referenced through the headers or what might have changed in boost 1.37 compared to 1.36 headers Dhruva Krishnamurthy-2 wrote:
Could you possibly send a small reproducer code. Since I have a setup of BOOST 1.37 with MSVC, MinGW and on GNU/Linux, I can test it.
-dhruva
2008/12/13 Amit Sonawane <asonawane@bmf.com.br>:
Environment:
WinXP SP2/Visual Studio Team System 2005/Boost 1.37.0 32-bit
Using boost.function in Boost 1.37.0 generates several errors. Compiler extract :
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(80) : error C2143: syntax error : missing ';' before 'namespace'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(980) : error C2838: '()' : illegal qualified name in member declaration
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(80) : see reference to class template instantiation 'boost::function0<R>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(995) : error C2804: binary 'operator ==' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1002) : error C2804: binary 'operator !=' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1098) : error C2764: 'R' : template parameter not used or deducible in partial specialization 'boost::function<R(void)>'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1098) : error C3412: 'boost::function<R(void)>' : cannot specialize template in current scope
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(90) : error C2061: syntax error : identifier 'function_buffer'
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(96) : see reference to class template instantiation 'boost::boost::detail::function::function_invoker1<FunctionPtr,R,T0>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(106) : error C2061: syntax error : identifier 'function_buffer'
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(113) : see reference to class template instantiation 'boost::boost::detail::function::void_function_invoker1<FunctionPtr,R,T0>' being compiled
In Boost 1.36.0 the code complies ok. Is it boost function or my code.
-- Contents reflect my personal views only! _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/Boost.Function-in-1.37.0-tp20981063p21021014.html Sent from the Boost - Users mailing list archive at Nabble.com.
On Mon, Dec 15, 2008 at 1:09 PM, asio_user <asonawane@bmf.com.br> wrote:
Actually, there is no code to reproduce this. The errors occur within one of the projects which complies ok with boost 1.36.0. I am not yet sure how does boost.function get referenced through the headers or what might have changed in boost 1.37 compared to 1.36 headers
Dhruva Krishnamurthy-2 wrote:
Could you possibly send a small reproducer code. Since I have a setup of BOOST 1.37 with MSVC, MinGW and on GNU/Linux, I can test it.
-dhruva
2008/12/13 Amit Sonawane <asonawane@bmf.com.br>:
Environment:
WinXP SP2/Visual Studio Team System 2005/Boost 1.37.0 32-bit
Using boost.function in Boost 1.37.0 generates several errors. Compiler extract :
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(80) : error C2143: syntax error : missing ';' before 'namespace'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(980) : error C2838: '()' : illegal qualified name in member declaration
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(80) : see reference to class template instantiation 'boost::function0<R>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(995) : error C2804: binary 'operator ==' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1002) : error C2804: binary 'operator !=' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1098) : error C2764: 'R' : template parameter not used or deducible in partial specialization 'boost::function<R(void)>'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(1098) : error C3412: 'boost::function<R(void)>' : cannot specialize template in current scope
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(90) : error C2061: syntax error : identifier 'function_buffer'
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(96) : see reference to class template instantiation 'boost::boost::detail::function::function_invoker1<FunctionPtr,R,T0>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(106) : error C2061: syntax error : identifier 'function_buffer'
28> c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function\function_template.hpp(113) : see reference to class template instantiation 'boost::boost::detail::function::void_function_invoker1<FunctionPtr,R,T0>' being compiled
In Boost 1.36.0 the code complies ok. Is it boost function or my code.
Just for note. I am using WinXP with VS2k5SP1 and my projects have had not errors appear when I changed to 1.37. If you can make a copy of your solution and start deleting things until you get to what is causing the problem, that would help quite a bit.
OvermindDL1 <overminddl1 <at> gmail.com> writes: (...)
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function \function_template.hpp(80)
: error C2143: syntax error : missing ';' before 'namespace'
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function \function_template.hpp(980)
: error C2838: '()' : illegal qualified name in member declaration
28>
c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function \function_template.hpp(80)
: see reference to class template instantiation 'boost::function0<R>' being compiled
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function \function_template.hpp(995)
: error C2804: binary 'operator ==' has too many parameters
28>c:\software\boost\boost_1_37_0\boost_1_37_0\boost\function \function_template.hpp(1002)
: error C2804: binary 'operator !=' has too many parameters
(...) I'm getting the same error with msvc9. Here's all that's needed to repro: #include <boost/function.hpp> I get 100+ compilation errors prior to getting to any non-boost code, starting with this error: \import\boost_1_37_0\include\boost/function/function_template.hpp(80) : error C2143: syntax error : missing ';' before 'namespace' I suspect a configuration error; I've looked at BOOST_FUNCTION_NUM_ARGS and other definitions. Adding a pragma once in some of the boost headers gets me past the first error, but the rest remain. Reverting back to the original, with functional.hpp included first, compiling with /p option shows (which expands macros) the following output (skipped ahead to relevant parts, ellipsis added to cut out some noise (more filename listings)): namespace boost { #line 23 \import\\boost_1_37_0\\include\\boost/type_traits/is_void.hpp template< typename T > struct is_void : ::boost::integral_constant<bool,false> { }; template<> struct is_void< void > : ::boost::integral_constant<bool,true> { }; template<> struct is_void< void const > : ::boost::integral_constant<bool,true> { }; template<> struct is_void< void volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_void< void const volatile > : ::boost::integral_constant<bool,true> { }; #line 31 \import\\boost_1_37_0\\include\\boost/type_traits/is_void.hpp #line 33 \import\\boost_1_37_0\\include\\boost/type_traits/is_void.hpp } #line 1 \import\\boost_1_37_0\\include\\boost/type_traits/detail /bool_trait_undef.hpp" #line 37 \import\\boost_1_37_0\\include\\boost/type_traits/is_void.hpp #line 39 \import\\boost_1_37_0\\include\\boost/type_traits/is_void.hpp (...) #line 1 \import\\boost_1_37_0\\include\\boost/function/function_template.hpp #line 1 \import\\boost_1_37_0\\include\\boost/function/detail/prologue.hpp #line 14 \import\\boost_1_37_0\\include\\boost/function/function_template.hpp #pragma warning( push ) #pragma warning( disable : 4127 ) #line 19 \import\\boost_1_37_0\\include\\boost/function/function_template.hpp #line 41 \import\\boost_1_37_0\\include\\boost/function/function_template.hpp #line 79 \import\\boost_1_37_0\\include\\boost/function/function_template.hpp namespace boost { namespace detail { namespace function { template< typename FunctionPtr, typename R > struct function_invoker0 { static R invoke(function_buffer& function_ptr ) { FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr); return f(); } }; template< typename FunctionPtr, typename R (...) And the first error is at line 80, ("namespace boost") as in the original posting. Any help would be greatly appreciated. Thanks.
Amit Sonawane wrote:
Environment:
WinXP SP2/Visual Studio Team System 2005/Boost 1.37.0 32-bit
Using boost.function in Boost 1.37.0 generates several errors. Compiler extract : [..] In Boost 1.36.0 the code complies ok. Is it boost function or my code.
As dhruva has suggested, you definitively should give a code example. We successfully compiled the boost library with VS 2005 and VS 2008 on Win XP. Currently we had not stumbled across any problems like this. Greetings from Bremen, Daniel Krügler
participants (6)
-
Amit Sonawane
-
asio_user
-
Daniel Krügler
-
dhruva
-
OvermindDL1
-
Tad Yeager