Hi, Degski wrote:
The problems arose while compiling the minimal example from the get started tutorial. Below I pasted some compiler (Clang-Cl.exe) output. It has all to do with MSVC compiler bugs workarounds.
<snip> The name of a macro is _MSC_VER, not __MSVC_VER. With MSC+Clang _MSC_VER, __clang__ and BOOST_CLANG are defined after inclusion of Boost.Config. When I compile the Boost.Geometry Quick Start example with MSC+Clang I only get errors in other libraries, i.e. TypeOf and TypeTraits (master branch). I'm still going to replace _MSC_VER checks in Geometry with BOOST_MSVC checks but this will not fix the issues you have. Side note: If you'd like to have this platform fully supported the best way would be to run the regression tests so the maintainers of all liberaries would be able to see the errors. Or you could try to convince people already running the tests on Windows to add one more compiler. Boost.TypeOf
1>z:\vc\x64\include\boost/typeof/msvc/typeof_impl.hpp(150,31): error : template specialization or definition requires a template parameter list corresponding to the nested type 'base_type' (aka 'msvc_extract_type<ID>') 1> struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature 1> ~~~~~~~~~ ^ 1>z:\vc\x64\include\boost/typeof/msvc/typeof_impl.hpp(150,20): error : nested name specifier for a declaration cannot depend on a template parameter 1> struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature 1> ^~~~~~~~~~~
https://github.com/boostorg/typeof/blob/boost-1.60.0/include/boost/typeof/ms...
This code is enabled when BOOST_MSVC is NOT defined or version is lesser
than 1300.
And the file is included if _MSC_VER is defined:
https://github.com/boostorg/typeof/blob/boost-1.60.0/include/boost/typeof/ty...
If BOOST_MSVC is checked instead then the code compiles but then
BOOST_TYPEOF_EMULATION is defined and I'm guessing this is not correct.
With Clang probably native __typeof__ should be used. So either
BOOST_CLANG/__clang__ should be checked here as a special case with
_MSC_VER or it should be checked above as a standalone case, or together
with __GNUC__. What would be prefered?
Boost.TypeTraits
1>D:\lib\modular-boost\boost/type_traits/has_nothrow_assign.hpp(64,7):
error : no template named 'is_assignable'; did you mean
'std::is_assignable'?
1> BOOST_HAS_NOTHROW_ASSIGN(T)
1> ^
1> D:\lib\modular-boost\boost/type_traits/intrinsics.hpp(199,96) :
note: expanded from macro 'BOOST_HAS_NOTHROW_ASSIGN'
1> # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) &&
!is_volatile<T>::value && is_assignable