Code:
#include <string>
#include <boost/format.hpp>
int main() {
boost::format fmt;
auto str = fmt % L"";
}
Errors:
1>D:.conan\a9fe50\1\include\boost\format\alt_sstream_impl.hpp(261,1): error C2660: 'std::allocator::allocate': function does not take 2 arguments 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(838,65): message : see declaration of 'std::allocator::allocate' 1>D:.conan\a9fe50\1\include\boost\format\alt_sstream_impl.hpp(228): message : while compiling class template member function 'int boost::io::basic_altstringbuf<Ch,Tr,Alloc>::overflow(int)' 1>
with 1> [ 1> Ch=char, 1>
Tr=std::char_traits, 1> Alloc=std::allocator 1> ] 1>D:.conan\a9fe50\1\include\boost\format\format_class.hpp(173): message : see reference to class template instantiation 'boost::io::basic_altstringbuf<Ch,Tr,Alloc>' being compiled 1>
with 1> [ 1> Ch=char, 1>
Tr=std::char_traits, 1> Alloc=std::allocator 1> ] 1>D:\Documents\source\repos\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.cpp(6): message : see reference to class template instantiation 'boost::basic_format<char,std::char_traits,std::allocator>' being compiled 1>Generating Code... 1>Done building project "ConsoleApplication3.vcxproj" -- FAILED.
Environment
- OS: Win10-64bit
- VC++ 2019 16.10.0
- Configuration: x86
- SDK version: 10.0(latest installed version)
- Language: std:c++latest
- Boost: 1.73
I upgraded VC++ today from 16.9 to 16.10, then compilation was broken.
It only happens when I use std:c++latest, but works fine with 'std:c++17'.