Skip to content

<format>: volatile integral<T> compilation error #2427

Description

@jovibor
#include <format>

int main()
{
    volatile int vol = 42;
    auto ret = std::format("{}", vol);
}

error C2668: 'std::_Format_arg_traits<_Context>::_Phony_basic_format_arg_constructor': ambiguous call to overloaded function

The same code compiles fine with {fmt}.
MSVS 17.0.4

Update:
It's rather volatile integral types fail to compile, because volatile double and float compile fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    LEWG issue neededA design defect that should be submitted to LEWG as a new issuebugSomething isn't workingfixedSomething works now, yay!formatC++20/23 format

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions