Opened 5 years ago
Last modified 5 years ago
#12995 new Bugs
Clang/C2 support
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | preprocessor |
Version: | Boost 1.64.0 | Severity: | Problem |
Keywords: | clang c2 visual studio | Cc: |
Description
It would be nice to get Boost to compile under Clang/C2 in Visual C++ 2017. Boost 1.63 almost did that, but Boost 1.64 does not. The problem is that Boost recognizes the compiler as Visual Studio, and then applies the corresponding workarounds. In particular, the workarounds include incorrect "pasting" in the implementation of macros in VC++, but that workaround is then an error under Clang.
Note:
See TracTickets
for help on using tickets.
From what I can see, this is primarily a bug in Boost.PP. Example code that only #includes <boost/mpl/vector.hpp> and nothing more, under Clang 3.9.1 on Windows:
You can work around these immediate issues with -Wno-invalid-token-paste (it's a warning that by default is an error). However, it doesn't fix everything: