Lines Matching refs:kSafe

53 static_assert(cast_safety<uint8_t>(0u) == CastSafety::kSafe);
54 static_assert(cast_safety<uint16_t>(max<uint8_t>) == CastSafety::kSafe);
55 static_assert(cast_safety<uint8_t>(static_cast<uint32_t>(max<uint8_t>)) == CastSafety::kSafe);
63 static_assert(cast_safety<int16_t>(0u) == CastSafety::kSafe);
64 static_assert(cast_safety<int16_t>(max<uint8_t>) == CastSafety::kSafe);
67 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>) - 1) == CastSafety::kSafe);
68 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>)) == CastSafety::kSafe);
74 static_assert(cast_safety<uint16_t>(0) == CastSafety::kSafe);
75 static_assert(cast_safety<uint16_t>(max<int8_t>) == CastSafety::kSafe);
76 static_assert(cast_safety<uint16_t>(max<int16_t>) == CastSafety::kSafe);
81 static_assert(cast_safety<uint32_t>(static_cast<int64_t>(max<uint32_t>) - 1) == CastSafety::kSafe);
82 static_assert(cast_safety<uint32_t>(static_cast<int64_t>(max<uint32_t>)) == CastSafety::kSafe);
89 static_assert(cast_safety<int8_t>(-128) == CastSafety::kSafe);
90 static_assert(cast_safety<int8_t>(127) == CastSafety::kSafe);
93 static_assert(cast_safety<int32_t>(static_cast<int64_t>(min<int32_t>)) == CastSafety::kSafe);
94 static_assert(cast_safety<int32_t>(static_cast<int64_t>(max<int32_t>)) == CastSafety::kSafe);
101 static_assert(cast_safety<double>(max<float>) == CastSafety::kSafe);
102 static_assert(cast_safety<double>(min<float>) == CastSafety::kSafe);
116 static_assert(cast_safety<float>(0u) == CastSafety::kSafe);
117 static_assert(cast_safety<float>(max<uint64_t>) == CastSafety::kSafe);
119 static_assert(cast_safety<double>(0u) == CastSafety::kSafe);
120 static_assert(cast_safety<double>(max<uint64_t>) == CastSafety::kSafe);
124 static_assert(cast_safety<float>(min<int64_t>) == CastSafety::kSafe);
125 static_assert(cast_safety<float>(max<int64_t>) == CastSafety::kSafe);
127 static_assert(cast_safety<double>(min<int64_t>) == CastSafety::kSafe);
128 static_assert(cast_safety<double>(max<int64_t>) == CastSafety::kSafe);
132 static_assert(cast_safety<uint32_t>(0.f) == CastSafety::kSafe);
141 static_assert(cast_safety<uint32_t>(static_cast<float>(max<int32_t>)) == CastSafety::kSafe);
143 static_assert(cast_safety<uint32_t>(static_cast<double>(max<int32_t>)) == CastSafety::kSafe);
144 static_assert(cast_safety<uint32_t>(static_cast<double>(max<uint32_t>)) == CastSafety::kSafe);
146 static_assert(cast_safety<uint64_t>(0.0) == CastSafety::kSafe);
151 static_assert(cast_safety<uint64_t>(static_cast<float>(max<int64_t>)) == CastSafety::kSafe);
153 static_assert(cast_safety<uint64_t>(static_cast<double>(max<int64_t>)) == CastSafety::kSafe);
158 static_assert(cast_safety<int32_t>(0.f) == CastSafety::kSafe);
166 static_assert(cast_safety<int32_t>(static_cast<float>(min<int32_t>)) == CastSafety::kSafe);
168 static_assert(cast_safety<int32_t>(static_cast<double>(min<int32_t>)) == CastSafety::kSafe);
169 static_assert(cast_safety<int32_t>(static_cast<double>(max<int32_t>)) == CastSafety::kSafe);
171 static_assert(cast_safety<int64_t>(0.0) == CastSafety::kSafe);
175 static_assert(cast_safety<int64_t>(static_cast<float>(min<int64_t>)) == CastSafety::kSafe);
177 static_assert(cast_safety<int64_t>(static_cast<double>(min<int64_t>)) == CastSafety::kSafe);
185 EXPECT_EQ(cast_safety<int32_t>(std::nexttowardf(min<int32_t>, 0)), CastSafety::kSafe); in TEST()
186 EXPECT_EQ(cast_safety<int32_t>(std::nexttowardf(max<int32_t>, 0)), CastSafety::kSafe); in TEST()
187 EXPECT_EQ(cast_safety<int64_t>(std::nexttoward(min<int64_t>, 0)), CastSafety::kSafe); in TEST()
188 EXPECT_EQ(cast_safety<int64_t>(std::nexttoward(max<int64_t>, 0)), CastSafety::kSafe); in TEST()