-
Couldn't load subscription status.
- Fork 813
Description
I'm trying to use cereal library in my C++20 pet project (using current gcc 10 snapshot). As far as the library is considered there's only one issue (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0806r2.html), implicit 'this' capture in two lambdas in cereal.hpp which results in a warning. Quite easy to fix. But there are two more "complicated" issues within tests:
-
basic_string.cpp - as far as I understand the error is in doctest
has_insertion_operatortrait. The root cause of this is:operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;(yes, this is explicitly deleted in C++20 stdlib). Assuming we aim at C++11 and onwards we can replace the check with slightly modified version of answer from SO: https://stackoverflow.com/a/22759544 - at least it won't fail to compile with C++2a enabled. The question is if we want to modify it in place or rather target to fix it upstream? -
performance.cpp - this one I don't have idea how to approach. The problem is in boost library, basically boost::format won't compile with C++20 because it use two argument Allocator::allocate somewhere deep. This was removed in C++20.
Any thoughts?
Things to fix
- implicit this capture in cereal.hpp [cpp20] explicitly capture 'this' as copy #640
- doctest ostream output for wchar_t StringMaker<wchar_t> fail to compile with C++20 enabled (GCC) doctest/doctest#357
- boost::format two argument allocator (to compile performance.cpp)