Я недавно обновился до Boost 1.71 x64-windows через vcpkg. В проекте Visual Studio 2017, который прекрасно скомпилирован перед обновлением, я теперь получаю эту ошибку:
2> \x64-windows\include\boost\test\tools\floating_point_comparison.hpp(60): error C2061: syntax error: identifier 'L'
2> \x64-windows\include\boost\test\tools\floating_point_comparison.hpp(68): note: see reference to class template instantiation 'boost::math::fpc::is_abstract_class_or_function<T>' being compiled
2> \x64-windows\include\boost\log\utility\formatting_ostream.hpp(562): note: see reference to function template instantiation 'boost::log::v2_mt_nt6::basic_formatting_ostream<char,std::char_traits<CharT>,std::allocator<char>> &boost::log::v2_mt_nt6::basic_formatting_ostream<CharT,std::char_traits<CharT>,std::allocator<char>>::formatted_write<_Elem>(const OtherCharT *,std::streamsize)' being compiled
Не уверен, что проблема в Boost :: Log или Boost :: Test. Вот неправильный код в плавающем_точке_компиляции.hpp:
template<typename T>
class is_abstract_class_or_function
{
typedef char (&Two)[2];
template<typename U> static char test(U(*)[1]); // <- ***
template<typename U> static Two test(...);
public:
static const bool value =
!is_reference<T>::value
&& !is_void<T>::value
&& (sizeof(test<T>(0)) == sizeof(Two));
};
Нет ошибок в выводе, которые относятся к моему коду. Фактически, я удалил все мои исходные файлы .cpp из проекта (просто оставил файлы заголовков) и все еще получил ошибку компиляции.