Why is the std::bitset constructor with an unsigned long long argument not marked as explicit?
The Standard Library class template std::bitset<N> has a constructor (C++11 and onwards, unsigned long argument before C++11) constexpr bitset(unsigned long long) noexcept Contrary to many best-practice guidelines, this single-argument constructor is not marked as explicit . What is the rationale behind this? TemplateRex Explicit construction The main objection against an explicit constructor is that copy-initialization from unsigned integers no longer works constexpr auto N = 64; std::bitset<N> b(0xDEADC0DE); // OK, direct initialization std::bitset<N> b = 0xDEADC0DE; // ERROR, copy