Lines Matching defs:from
14 // constexpr To bit_cast(const From& from) noexcept; // C++20
29 void test_roundtrip_through_buffer(T from) {
31 Buffer middle = std::bit_cast<Buffer>(from);
35 assert((from == to) == (from == from)); // because NaN
38 assert(std::memcmp(&from, &middle, sizeof(T)) == 0);
45 void test_roundtrip_through_nested_T(T from) {
49 Nested middle = std::bit_cast<Nested>(from);
53 assert((from == to) == (from == from)); // because NaN
56 assert(std::memcmp(&from, &middle, sizeof(T)) == 0);
63 void test_roundtrip_through(T from) {
66 Intermediate middle = std::bit_cast<Intermediate>(from);
70 assert((from == to) == (from == from)); // because NaN
73 assert(std::memcmp(&from, &middle, sizeof(T)) == 0);
271 int from = 3;
272 Nested middle = std::bit_cast<Nested>(from);
274 assert(from == to);