Skip to content

libc++ formatter concept depends on itself #81590

Closed
@kelbon

Description

@kelbon

It is fixable with returning -> decltype(ctx.out()), but something went wrong, other libraries and compilers do not produce such errors.

https://godbolt.org/z/v1b13Mhb3

Localy (msvc library, clang17) error is worse (there are no consteval functions)

error localy In file included from E:/dev/projects/BC/src/sema.cpp:8: In file included from E:/dev/projects/BC/include\utility/print.h:3: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\format:649:42: error: call to immediate function 'std::formatter::format>, char>>' is not a constant expression 649 | _Format_ctx.advance_to(_Formatter.format(

Metadata

Metadata

Assignees

Labels

formatC++20 std::format or std::print, and anything related to themlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions