safe_numerics icon indicating copy to clipboard operation
safe_numerics copied to clipboard

[With example] Make copy constructible

Open Spixmaster opened this issue 4 weeks ago • 0 comments

Source:

std::unordered_map<boost::safe_numerics::safe<std::int32_t>, std::string> tmp;

Result:

/home/matheus/programmieren/c++/argo/src/database/User.cpp:508:87:   required from here
  508 |             std::unordered_map<boost::safe_numerics::safe<std::int32_t>, std::string> tmp;
      |                                                                                       ^~~
/usr/include/c++/15.2.1/bits/hashtable.h:210:51: Fehler: statische Assertion fehlgeschlagen: hash function must be copy constructible
  210 |       static_assert(is_copy_constructible<_Hash>::value,
      |                                                   ^~~~~

Spixmaster avatar Dec 09 '25 09:12 Spixmaster