
Hello. I'm unable to compile boost in Embarcadero 2010 (CodeGear) version 0x621. My code is really simple: #include "boost/random/mersenne_twister.hpp" This produces this error: [BCC32 Error] mersenne_twister.hpp(63): E2299 Cannot generate template specialization from 'detail::disable_constructor<Engine,T>' in the line: BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(mersenne_twister, Generator, gen) { seed(gen); } I have preprocessed my .cpp in order to see if boost gets correctly self configured for CodeGear compiler. It does very well, because it enters into codegear.hpp. But the last checked version of the CodeGear compiler is 0x620, and my version is 0x621. I have tried to change this line: // versions check: // last known and checked version is 0x620 #if (__CODEGEARC__ > 0x621) and this one: // CodeGear C++ Builder 2010 #if (__CODEGEARC__ <= 0x621) / # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type etc... so that the compiler ignores or enters those sections, but nothing changes. It seems slightly strange to me that version 0x620 and 0x621 are SO different that boost is unable to get compiled. This problem has raised when trying to compile my application with libLAS library, which uses guid.hpp (which uses mersenne_twister.hpp), and there are much more compiler errors than the one I am explaining here. I guess (and hope) they are part of the same problem. No problems arise with other boost modules like, for example, "boost/smart_ptr.hpp". Help will be appreciated. Thanks!

AMDG On 12/17/2010 2:26 AM, jose perez wrote:
I'm unable to compile boost in Embarcadero 2010 (CodeGear) version 0x621. My code is really simple:
#include "boost/random/mersenne_twister.hpp"
This produces this error:
[BCC32 Error] mersenne_twister.hpp(63): E2299 Cannot generate template specialization from 'detail::disable_constructor<Engine,T>'
in the line:
BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(mersenne_twister, Generator, gen) { seed(gen); }
Does it work if you go to boost/random/detail/seed.hpp line 20 (The #if), and add !defined(__CODEGEARC__) to the list? In Christ, Steven Watanabe

Hello, Steven. Thanks very much for your help. Well, I have added this: #if !defined(BOOST_NO_SFINAE) && !defined(__CODEGEARC__) // curru and the compiler does not produce the error anymore (so your suggestion was ok) but many other errors arise. The first one is: [BCC32 Error] has_key_impl.hpp(51): E2285 Could not find a match for 'aux::ptr_to_ref<T>(Set *)' in line : bool_< ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0) ) ) == sizeof(aux::no_tag) ) > Waiting for your answer!! :-) Best regards. jose ________________________________ De: Steven Watanabe <watanabesj@gmail.com> Para: boost-users@lists.boost.org Enviado: vie,17 diciembre, 2010 17:45 Asunto: Re: [Boost-users] Problems in CodeGear AMDG On 12/17/2010 2:26 AM, jose perez wrote:
I'm unable to compile boost in Embarcadero 2010 (CodeGear) version 0x621. My code is really simple:
#include "boost/random/mersenne_twister.hpp"
This produces this error:
[BCC32 Error] mersenne_twister.hpp(63): E2299 Cannot generate template specialization from 'detail::disable_constructor<Engine,T>'
in the line:
BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(mersenne_twister, Generator, gen) { seed(gen); }
Does it work if you go to boost/random/detail/seed.hpp line 20 (The #if), and add !defined(__CODEGEARC__) to the list? In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

AMDG On 12/17/2010 5:14 PM, jose perez wrote:
Thanks very much for your help. Well, I have added this:
#if !defined(BOOST_NO_SFINAE)&& !defined(__CODEGEARC__) // curru
and the compiler does not produce the error anymore (so your suggestion was ok) but many other errors arise. The first one is:
[BCC32 Error] has_key_impl.hpp(51): E2285 Could not find a match for 'aux::ptr_to_ref<T>(Set *)'
in line
: bool_< ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0) ) ) == sizeof(aux::no_tag) ) >
This is in MPL. It looks like the same error as http://www.boost.org/development/tests/trunk/developer/output/codegear-boost... This happens with just #include <boost/random/mersenne_twister.hpp>? I see a note that says: [ Aleksey Gurtovoy 17 Sep 2004 ] This is an advanced functionality that hasn't been ported to the deficient compilers (yet). Patches are welcome! Is there a way to get more information out of the compiler? I'd like to see a #include backtrace and a template instantiation backtrace to figure out where the dependency on mpl::set comes from. In Christ, Steven Watanabe

Hello, Steven. This is the parser: [BCC32 Error] has_key_impl.hpp(51): E2285 Could not find a match for 'aux::ptr_to_ref<T>(Set *)' Full parser context lasreader.cpp(44): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas\lasreader.hpp lasreader.hpp(46): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas/lasheader.hpp lasheader.hpp(47): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas/lasbounds.hpp lasbounds.hpp(46): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas/laspoint.hpp laspoint.hpp(50): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas/external/property_tree/ptree.hpp ptree.hpp(21): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index_container.hpp multi_index_container.hpp(30): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index_container_fwd.hpp multi_index_container_fwd.hpp(19): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index/ordered_index_fwd.hpp ordered_index_fwd.hpp(16): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index/detail/ord_index_args.hpp ord_index_args.hpp(21): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index/tag.hpp tag.hpp(17): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index/detail/no_duplicate_tags.hpp no_duplicate_tags.hpp(18): #include C:\Software\Lib\boost\boost_1_42_0\boost/mpl/set/set0.hpp set0.hpp(18): #include C:\Software\Lib\boost\boost_1_42_0\boost/mpl/set/aux_/at_impl.hpp at_impl.hpp(18): #include C:\Software\Lib\boost\boost_1_42_0\boost/mpl/set/aux_/has_key_impl.hpp has_key_impl.hpp(28): namespace boost has_key_impl.hpp(28): namespace mpl has_key_impl.hpp(32): class has_key_impl<aux::set_tag> has_key_impl.hpp(47): class has_key_impl<aux::set_tag>::apply<Set,T> I don't know how to give you a template instantiation backtrace... Thanks! ________________________________ De: Steven Watanabe <watanabesj@gmail.com> Para: boost-users@lists.boost.org Enviado: jue,30 diciembre, 2010 04:21 Asunto: Re: [Boost-users] Problems in CodeGear AMDG On 12/17/2010 5:14 PM, jose perez wrote:
Thanks very much for your help. Well, I have added this:
#if !defined(BOOST_NO_SFINAE)&& !defined(__CODEGEARC__) // curru
and the compiler does not produce the error anymore (so your suggestion was ok) but many other errors arise. The first one is:
[BCC32 Error] has_key_impl.hpp(51): E2285 Could not find a match for 'aux::ptr_to_ref<T>(Set *)'
in line
: bool_< ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0) ) ) == sizeof(aux::no_tag) ) >
This is in MPL. It looks like the same error as http://www.boost.org/development/tests/trunk/developer/output/codegear-boost... This happens with just #include <boost/random/mersenne_twister.hpp>? I see a note that says: [ Aleksey Gurtovoy 17 Sep 2004 ] This is an advanced functionality that hasn't been ported to the deficient compilers (yet). Patches are welcome! Is there a way to get more information out of the compiler? I'd like to see a #include backtrace and a template instantiation backtrace to figure out where the dependency on mpl::set comes from. In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

AMDG On 1/5/2011 3:35 PM, jose perez wrote:
This is the parser:
[BCC32 Error] has_key_impl.hpp(51): E2285 Could not find a match for 'aux::ptr_to_ref<T>(Set *)' Full parser context <snip> laspoint.hpp(50): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas/external/property_tree/ptree.hpp
ptree.hpp(21): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index_container.hpp <snip>
Okay. So this isn't just Random. The dependency is from property_tree. I don't know how feasible it is to fix these errors. Although some of the older (and simpler) libraries work with this compiler, it's been effectively unsupported for years. Someone with access to the compiler would have to figure it out.
no_duplicate_tags.hpp(18): #include C:\Software\Lib\boost\boost_1_42_0\boost/mpl/set/set0.hpp <snip>
I don't know how to give you a template instantiation backtrace...
Fine. I don't think it would give me any more information. In Christ, Steven Watanabe

So your suggestion is to contact Embarcadero developers directly, isn't it? ________________________________ De: Steven Watanabe <watanabesj@gmail.com> Para: boost-users@lists.boost.org Enviado: jue,6 enero, 2011 01:31 Asunto: Re: [Boost-users] Problems in CodeGear AMDG On 1/5/2011 3:35 PM, jose perez wrote:
This is the parser:
[BCC32 Error] has_key_impl.hpp(51): E2285 Could not find a match for 'aux::ptr_to_ref<T>(Set *)' Full parser context <snip> laspoint.hpp(50): #include C:\Software\Lib\LIDAR\liblas\libLAS-1.6.0b3\include\liblas/external/property_tree/ptree.hpp p
ptree.hpp(21): #include C:\Software\Lib\boost\boost_1_42_0\boost/multi_index_container.hpp <snip>
Okay. So this isn't just Random. The dependency is from property_tree. I don't know how feasible it is to fix these errors. Although some of the older (and simpler) libraries work with this compiler, it's been effectively unsupported for years. Someone with access to the compiler would have to figure it out.
no_duplicate_tags.hpp(18): #include C:\Software\Lib\boost\boost_1_42_0\boost/mpl/set/set0.hpp <snip>
I don't know how to give you a template instantiation backtrace...
Fine. I don't think it would give me any more information. In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
jose perez
-
Steven Watanabe