Skip to content

wrong length detected for atomic<uint64_t> #507

@tamboril

Description

@tamboril

For some reason, a uint64_t is formatted fine, but an std::atomic<uint64_t>, which defines
operator uint64() gets truncated to an int.

So these yield different output:

auto c = std::atomic<uint64_t> { 0x0000'0001'0000'0021ull };
cout << fmt::format("{}", c) << endl;
cout << fmt::format("{}", c.load()) << endl;

Output: 
33
4294967329

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