Skip to content

Backporting the library to C++11 #2

@gennaroprota

Description

@gennaroprota

Vinnie expressed a desire to make this library C++11. Here's a breakdown of the post-C++11 core and library features that are currently used:

  • Concepts: These can be replaced with SFINAE-based constructs. There's just a handful of these.

  • if constexpr with branches that would not compile simultaneously: Can be replaced with tag dispatching, std::enable_if or template specializations. There are about 40 occurrences of these.

  • Nested namespace definitions: Easily replaceable. There are just 18 of these.

  • operator<=>: Replaceable by separate comparison operators. There are about 10 of these, which would produce about 60 comparison operators.

  • std::format() and std::println(): Used pervasively (about 50 occurrences). Can be replaced with string concatenation/iostreams. Some types have their formatters, so we should define stream inserters for them.

  • std::string_view: Also used pervasively (460+ occurrences). Can be replaced with std::string or char const *, as appropriate.

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