Skip to content

Use of std::basic_string<uint32_t> will likely break with libc++ >= 19.0.0 #908

@risicle

Description

@risicle

https://github.com/cpp-netlib/cpp-netlib/blob/552ce94bd91c055f11ba524adf0ca0712063d711/libs/network/src/server_request_parsers_impl.cpp#L21C1-L21C8

In libc++ 19.0.0 release notes (https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html):

The base template for std::char_traits has been removed in LLVM 19. If you are using std::char_traits with types other than char, wchar_t, char8_t, char16_t, char32_t or a custom character type for which you specialized std::char_traits, your code will stop working. The Standard does not mandate that a base template is provided, and such a base template is bound to be incorrect for some types, which could currently cause unexpected behavior while going undetected.

In NixOS, this is creating build failures for us when building cpp-netlib-0.13.0-final with clang:

In file included from /tmp/nix-build-cpp-netlib-0.13.0-final.drv-0/source/libs/network/src/server_request_parsers_impl.cpp:10:
In file included from /tmp/nix-build-cpp-netlib-0.13.0-final.drv-0/source/boost/network/protocol/http/server/impl/parsers.ipp:5:
In file included from include/boost/spirit/include/qi.hpp:16:
In file included from include/boost/spirit/home/qi.hpp:14:
...
...
In file included from /nix/store/kx521w0j19ssvmcw8gfziiszjgm2bf8x-libcxx-19.1.7-dev/include/c++/v1/__format/parser_std_format_spec.h:39:
/nix/store/kx521w0j19ssvmcw8gfziiszjgm2bf8x-libcxx-19.1.7-dev/include/c++/v1/string:2538:5: error: implicit instantiation of undefined template 'std::char_traits<unsigned int>'

but I note that in your main it has been relocated to the above file with minimal changes so you're likely to have the same issues.

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