Skip to content

constexpr boost::static_strings::basic_static_string s( "name" ); fails #55

@pdimov

Description

@pdimov

constexpr boost::static_strings::basic_static_string s( "name" ); fails to compile (under C++20): https://godbolt.org/z/fvPs3rxa7

Background: in order to write functions that take strings as template arguments, as in function<"string">(), one needs to declare the template parameter a static string, because neither char const* nor std::string_view work.

To avoid needless reinvention of static strings, ours should (probably) be useful in this role. But it isn't, for at least the reason above.

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