Boost logo

Boost :

Subject: Re: [boost] [log] sourceforge trunk broken with clang
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-12-17 06:42:54

On Thursday, December 15, 2011 19:10:06 Michael Caisse wrote:
> Changeset 633 fails to compile with clang. The trivial logger example in
> tutorial will trigger multiple errors.
> My guess is that simply including trivial.hpp will do the same.

I've just tried to compile Boost.Log bleeding-edge branch with clang and got
lots of errors like this:

libs/log/src/core.cpp:320:19: error: use of overloaded operator '=' is
ambiguous (with operand types 'filter_type' (aka 'light_function1<bool, const
values_view_type &>') and 'const filter_type' (aka 'const
light_function1<bool, const values_view_type &>'))
    pImpl->Filter = filter;
    ~~~~~~~~~~~~~ ^ ~~~~~~
libs/log/src/core.cpp:555:33: note: in instantiation of member function
'boost::log2_mt_posix::basic_core<char>::set_filter' requested here
template class BOOST_LOG_EXPORT basic_core< char >;
./boost/log/detail/light_function.hpp:171:32: note: candidate function
./boost/log/detail/light_function.hpp:178:32: note: candidate function
    BOOST_LOG_LWFUNCTION_NAME& operator= (int p)

I think this is a compiler bug since there is a conversion constructor which
should be used in this case. I also had other reports of weird problems with
clang. All in all, I consider clang to be at a too early stage of development
to support it in the libraries.

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