[cfe-dev] clang-cl error on building simple cpp with only windows.h + boost-mutex included

Yaron Keren via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 10 22:23:56 PST 2016


BOOST + clang-cl is an mostly an untested combination. Some part of BOOST
identify clang as MSVC and provide workaround MSVC or features which are
not required or not compatible with clang. I reported some issues to BOOST
and clang which got fixed about two months ago but there were more
unresolved issues I didn't have the time to look into.

2016-02-11 7:56 GMT+02:00 Dennis Luehring <dl.soluz at gmx.net>:

> Am 11.02.2016 um 06:38 schrieb Yaron Keren:
>
>> Try -DBOOST_USE_WINDOWS_H
>> -DBOOST_SP_USE_STD_ATOMIC may also be needed.
>>
>
> another test does not compile
>
> ---- internal_tests.cpp
> #include <boost/signals2.hpp>
>
> typedef boost::signals2::signal<void (int test)> my_signal;
> ----
>
> 1>  In file included from internal_tests.cpp:2:
> 1>  In file included from
> D:\projects\test\\..\boost_1_60_0\boost/signals2.hpp:18:
> 1>  In file included from
> D:\projects\test\\..\boost_1_60_0\boost/signals2/last_value.hpp:14:
> 1>  In file included from
> D:\projects\test\\..\boost_1_60_0\boost/optional.hpp:15:
> 1>  In file included from
> D:\projects\test\\..\boost_1_60_0\boost/optional/optional.hpp:34:
> 1>D:\projects\testr\\..\boost_1_60_0\boost/type_traits/has_nothrow_constructor.hpp(26,83):
> error : use of undeclared identifier 'is_default_constructible'
> 1>  template <class T> struct has_nothrow_constructor : public
> integral_constant<bool, BOOST_HAS_NOTHROW_CONSTRUCTOR(T)>{};
> 1> ^
> 1>
> D:\projects\testr\\..\boost_1_60_0\boost/type_traits/intrinsics.hpp(193,79)
> :  note: expanded from macro 'BOOST_HAS_NOTHROW_CONSTRUCTOR'
> 1>  #     define BOOST_HAS_NOTHROW_CONSTRUCTOR(T)
> (__has_nothrow_constructor(T) && is_default_constructible<T>::value)
> 1>
>
> >20 errors
>
> btw: BOOST_SP_USE_STD_ATOMIC does not work for VS 2010 - there is no
> std::atomic available in the microsoft/VS2010 STL
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160211/a71b52c6/attachment.html>


More information about the cfe-dev mailing list