Failures on MSVC
Closed this issue · 9 comments
testing.capture-output bin.v2\libs\sort\test\test_flat_stable_sort.test\msvc-14.1\debug\optimization-speed\threadapi-win32\threading-multi\test_flat_stable_sort.run
====== BEGIN OUTPUT ======
Running 1 test case...
unknown location(0): fatal error: in "test_main_caller(_argc,_argv_)": C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\vector(140) : Assertion failed: vector iterator + offset out of range
*** 1 failure is detected in the test module "Test Program"
EXIT STATUS: 201
====== END OUTPUT ======
See https://ci.appveyor.com/project/boostorg/boost/build/1.0.4436-develop/job/3iuoitpwo712t9l9#L268
Thanks for the report! I've asked Francisco to take a look.
msvc-14.1 is now green:
https://ci.appveyor.com/project/boostorg/boost/build/1.0.4718-develop
but there are failures on msvc-12.0 related to noexcept
which the compiler does not support.
compile-c-c++ bin.v2\libs\sort\test\test_flat_stable_sort.test\msvc-12.0\debug\optimization-speed\threadapi-win32\threading-multi\test_flat_stable_sort.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
test_flat_stable_sort.cpp
C:\projects\boost\boost/sort/common/util/algorithm.hpp(87) : error C2143: syntax error : missing ';' before 'const'
C:\projects\boost\boost/sort/common/util/algorithm.hpp(87) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\projects\boost\boost/sort/common/util/algorithm.hpp(114) : error C3646: 'noexcept' : unknown override specifier
C:\projects\boost\boost/sort/common/util/algorithm.hpp(128) : error C3646: 'noexcept' : unknown override specifier
Also, apparently -std=c++11
is passed to the compiler, but MSVC does not support such an option.
You should either add Appveyor integration to Sort, or watch https://ci.appveyor.com/project/boostorg/boost/history for the "Update sort from ..." commits and look at the failures there.
Travis integration will probably help too; I can add this for you if you like.
It's fine if you don't support msvc-12.0 for the C++11 algorithms, but the Jamfile isn't correct. You're not supposed to add -std=c++11
to the command line; the choice of what C++ mode to use is made by whoever runs the tests. He may wish to use C++14 or C++17, for instance.
The right way is to add [ requires cxx11_constexpr ]
(for example) to the tests that require C++11; this will skip them on compilers that don't support constexpr
according to Boost.Config. (Or you could use [ requires cxx11_noexcept ]
instead if you like.)
See http://www.boost.org/doc/libs/1_65_1/libs/config/doc/html/boost_config/build_config.html for how to do it.
I've reviewed your commit and I'll fix the Jamfile for you.
Done. I also enabled Travis: https://travis-ci.org/boostorg/sort