Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cereal and C++20 #638

@lukaszgemborowski

Description

@lukaszgemborowski

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:

  1. basic_string.cpp - as far as I understand the error is in doctest has_insertion_operator trait. 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?

  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions