#65 Json::Value(std::uint64_t) is ambiguous

0.5.0
open
nobody
None
5
2014-08-30
2014-02-25
No

consider the following example for version 0.6.0-rc2 under GCC 4.8.1 --std=C++11 on Linux

int main(int argc, char** argv) {
    std::uint32_t u32 = 10;
    std::uint64_t u64 = 10;

    Json::Value val32 = u32;

    // does not compile
    // Json::Value(std::uint64_t) is ambiguous
    Json::Value val64 = u64;

    return 0;
}

There are various other common statements where the same problem manifests.

It appears that the definition for Json::UInt64 is incompatible with std::uint64_t for the purpose of resolving ctor signatures (even though direct assignments between std::uint64_t and Json::UInt64 are fine).

Seems like Json::UInt64 should map to std::uint64_t if it is defined

Discussion