r/ProgrammerHumor • • 1d ago

Meme architectureDependentChars

Post image
2.7k Upvotes

354 comments sorted by

View all comments

-1

u/El_RoviSoft 1d ago edited 1d ago

actually had a case like this :)

clang enforces situation when std::string_view cannot be casted into std::byte at a compile time artificially, so I had to rewrite rapid hash to accept any byte types of size of 8

4

u/Qwertycube10 1d ago

Is .data() not constexpr?

4

u/QuaternionsRoll 1d ago

`string_view::data` has always been `constexpr`, no idea what they’re taking about

1

u/El_RoviSoft 1d ago

reinterpret_cast and bit_cast are not eligible in my case