7

I receive the following build error when switching to LLVM toolset in VS2017 to build code using Boost 1.68. The code builds fine with MSVC compiler. 1>C:\boost_1_68_0\boost/type_traits/has_trivial_move_assign.hpp(49): error : no template named 'is_assignable'; did you mean 'std::is_assignable'? 1>C:\boost_1_68_0\boost/type_traits/intrinsics.hpp(233): note: expanded from macro 'BOOST_HAS_TRIVIAL_MOVE_ASSIGN'

oracle3001
  • 1,090
  • 19
  • 31
  • 1
    I get this on every Windows Clang configuration (even MinGW-w64): https://ci.appveyor.com/project/RubenVanBoxem/skui/builds/20372388 – rubenvb Nov 18 '18 at 19:20
  • 1
    I can work around this (i.e. make stuff compile) by adding `std::` to the `is_assignable` the error mentions (intrinsics.hpp:233). I'm entirely unsure of the validity/impact of this fix though... – rubenvb Nov 19 '18 at 19:21

1 Answers1

3

I think your problem here may be __clang vs. __clang__ to ID the compiler. Clang has different predefined macros depending on what front end is used. Because of this confusion, you boost may fail to include the header boost/type_traits/is_assignable.hpp which defines the is_assignable that you are missing. Try this: In boost/type_traits/has_trivial_move_assign.hpp add || defined(__clang__) the line that tests for clang

#if defined(__GNUC__) || defined(__clang)
#include <boost/type_traits/is_assignable.hpp>

to make:

#if defined(__GNUC__) || defined(__clang) || defined(__clang__) 
#include <boost/type_traits/is_assignable.hpp>

Boost should then include is_assignable.hpp and build.