|
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)
>
OK.
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:
79,91d78
< // Daniel Wallin discovered that bind/apply.hpp badly interacts with the
apply<>
< // member template of a factory as used in the optional<> implementation.
< // He proposed this simple fix which is to move the call to apply<>
outside
< // 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);
< }
< }
<
325c312
< boost_optional_detail::construct<value_type>(factory,
m_storage.address());
--- > 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: gcc.link ../../../bin.v2/libs/optional/test/optional_test.test/gcc-4.0.2 Copyright/debug/optional_test /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' ../../../bin.v2/libs/optional/test/optional_test.test/gcc-4.0.2 Copyright/debug/optional_test.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0):/usr/include/c++/3.3/new:94: first defined here collect2: ld returned 1 exit status "g++" -o "../../../bin.v2/libs/optional/test/optional_test.test/gcc-4.0.2 Copyright/debug/optional_test" -Wl,--start-group "../../../bin.v2/libs/optional/test/optional_test.test/gcc-4.0.2 Copyright/debug/optional_test.o" -Wl,--end-group -g ...failed gcc.link ../../../bin.v2/libs/optional/test/optional_test.test/gcc-4.0.2 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. Best Fernando Cacciola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk