Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2007-03-07 11:39:55

Thomas Witt wrote:
> Fernando,
> Fernando Cacciola wrote:
>> How about I report on the status tomorrow noon? (my time, UTC-3)
Comming up with a fix was quite easy, specially given that, a I said, this
was a known problem and I had the fix waiting to be applied (but needed a
linux box to test it). I still don't understand why it showed up after my
lastest changes

Anyway, here's the diff:

< // Daniel Wallin discovered that bind/apply.hpp badly interacts with the
< // member template of a factory as used in the optional<> implementation.
< // He proposed this simple fix which is to move the call to apply<>
< // namespace boost.
< namespace boost_optional_detail
< {
< template <class T, class Factory>
< void construct(Factory const& factory, void* address)
< {
< factory.BOOST_NESTED_TEMPLATE apply<T>(address);
< }
< }
< boost_optional_detail::construct<value_type>(factory,

>        factory.BOOST_NESTED_TEMPLATE 
> apply<value_type>(m_storage.address()) ;
Unfortunately, I couldn't test it on gcc.
I got stuck pretty much all morning on this error: ../../../bin.v2/libs/optional/test/optional_test.test/gcc-4.0.2
/usr/lib/libc_nonshared.a(elf-init.oS)(.text.__i686.get_pc_thunk.bx+0x0): In 
function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
first defined here
collect2: ld returned 1 exit status
    "g++"    -o 
Copyright/debug/optional_test" -Wl,--start-group 
Copyright/debug/optional_test.o"    -Wl,--end-group -g
Googling indicates that I have my gcc installation messed up, but couldn't 
fix it yet.
So, can anyone tried the patch on gcc? It works here on VC80 and VC7.1.
Fernando Cacciola 

Boost list run by bdawes at, gregod at, cpdaniel at, john at