@@ -68,7 +68,7 @@ namespace concepts
6868{
6969
7070template <typename T>
71- NBL_BOOL_CONCEPT ImitationIntegral64Scalar = same_as<T, emulated_uint64_t> || same_as<T, emulated_int64_t>;
71+ NBL_BOOL_CONCEPT EmulatedIntegralScalar64 = same_as<T, emulated_uint64_t> || same_as<T, emulated_int64_t>;
7272
7373namespace impl
7474{
@@ -93,8 +93,8 @@ struct is_emulating_integral_scalar<emulated_int64_t>
9393namespace impl
9494{
9595
96- template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::ImitationIntegral64Scalar <To> && concepts::ImitationIntegral64Scalar <From> && !concepts::same_as<To, From>)
97- struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::ImitationIntegral64Scalar <To> && concepts::ImitationIntegral64Scalar <From> && !concepts::same_as<To, From>) >
96+ template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::EmulatedIntegralScalar64 <To> && concepts::EmulatedIntegralScalar64 <From> && !concepts::same_as<To, From>)
97+ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::EmulatedIntegralScalar64 <To> && concepts::EmulatedIntegralScalar64 <From> && !concepts::same_as<To, From>) >
9898{
9999
100100 NBL_CONSTEXPR_STATIC To cast (NBL_CONST_REF_ARG (From) other)
@@ -105,8 +105,8 @@ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT(concepts::ImitationIntegr
105105 }
106106};
107107
108- template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<To> && (sizeof (To) <= sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <From>)
109- struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<To> && (sizeof (To) <= sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <From>) >
108+ template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<To> && (sizeof (To) <= sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <From>)
109+ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<To> && (sizeof (To) <= sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <From>) >
110110{
111111 // Return only the lowest bits
112112 NBL_CONSTEXPR_STATIC To cast (NBL_CONST_REF_ARG (From) val)
@@ -115,17 +115,17 @@ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT(concepts::IntegralScalar<
115115 }
116116};
117117
118- template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<To> && (sizeof (To) > sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <From>)
119- struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<To> && (sizeof (To) > sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <From>) >
118+ template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<To> && (sizeof (To) > sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <From>)
119+ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<To> && (sizeof (To) > sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <From>) >
120120{
121121 NBL_CONSTEXPR_STATIC To cast (NBL_CONST_REF_ARG (From) val)
122122 {
123123 return bit_cast<To>(val.data);
124124 }
125125};
126126
127- template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<From> && (sizeof (From) <= sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <To>)
128- struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<From> && (sizeof (From) <= sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <To>) >
127+ template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<From> && (sizeof (From) <= sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <To>)
128+ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<From> && (sizeof (From) <= sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <To>) >
129129{
130130 // Set only lower bits
131131 NBL_CONSTEXPR_STATIC To cast (NBL_CONST_REF_ARG (From) i)
@@ -134,8 +134,8 @@ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT(concepts::IntegralScalar<
134134 }
135135};
136136
137- template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<From> && (sizeof (From) > sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <To>)
138- struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<From> && (sizeof (From) > sizeof (uint32_t)) && concepts::ImitationIntegral64Scalar <To>) >
137+ template<typename To, typename From> NBL_PARTIAL_REQ_TOP (concepts::IntegralScalar<From> && (sizeof (From) > sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <To>)
138+ struct static_cast_helper<To, From NBL_PARTIAL_REQ_BOT (concepts::IntegralScalar<From> && (sizeof (From) > sizeof (uint32_t)) && concepts::EmulatedIntegralScalar64 <To>) >
139139{
140140 NBL_CONSTEXPR_STATIC To cast (NBL_CONST_REF_ARG (From) i)
141141 {
@@ -188,8 +188,8 @@ constexpr emulated_uint64_t::operator I() const noexcept
188188
189189// ---------------------- Functional operators ------------------------
190190
191- template<typename T> NBL_PARTIAL_REQ_TOP (concepts::ImitationIntegral64Scalar <T>)
192- struct left_shift_operator<T NBL_PARTIAL_REQ_BOT (concepts::ImitationIntegral64Scalar <T>) >
191+ template<typename T> NBL_PARTIAL_REQ_TOP (concepts::EmulatedIntegralScalar64 <T>)
192+ struct left_shift_operator<T NBL_PARTIAL_REQ_BOT (concepts::EmulatedIntegralScalar64 <T>) >
193193{
194194 using type_t = T;
195195 NBL_CONSTEXPR_STATIC uint32_t ComponentBitWidth = uint32_t (8 * sizeof (uint32_t));
@@ -302,8 +302,8 @@ constexpr inline emulated_int64_t emulated_int64_t::operator>>(uint32_t bits) co
302302// Specializations of the structs found in functional.hlsl
303303// These all have to be specialized because of the identity that can't be initialized inside the struct definition
304304
305- template<typename T> NBL_PARTIAL_REQ_TOP (concepts::ImitationIntegral64Scalar <T>)
306- struct plus<T NBL_PARTIAL_REQ_BOT (concepts::ImitationIntegral64Scalar <T>) >
305+ template<typename T> NBL_PARTIAL_REQ_TOP (concepts::EmulatedIntegralScalar64 <T>)
306+ struct plus<T NBL_PARTIAL_REQ_BOT (concepts::EmulatedIntegralScalar64 <T>) >
307307{
308308 using type_t = T;
309309
@@ -315,8 +315,8 @@ struct plus<T NBL_PARTIAL_REQ_BOT(concepts::ImitationIntegral64Scalar<T>) >
315315 const static type_t identity;
316316};
317317
318- template<typename T> NBL_PARTIAL_REQ_TOP (concepts::ImitationIntegral64Scalar <T>)
319- struct minus<T NBL_PARTIAL_REQ_BOT (concepts::ImitationIntegral64Scalar <T>) >
318+ template<typename T> NBL_PARTIAL_REQ_TOP (concepts::EmulatedIntegralScalar64 <T>)
319+ struct minus<T NBL_PARTIAL_REQ_BOT (concepts::EmulatedIntegralScalar64 <T>) >
320320{
321321 using type_t = T;
322322
@@ -340,8 +340,8 @@ NBL_CONSTEXPR_INLINE_NSPC_SCOPE_VAR emulated_int64_t minus<emulated_int64_t>::id
340340// --------------------------------- Compound assignment operators ------------------------------------------
341341// Specializations of the structs found in functional.hlsl
342342
343- template<typename T> NBL_PARTIAL_REQ_TOP (concepts::ImitationIntegral64Scalar <T>)
344- struct plus_assign<T NBL_PARTIAL_REQ_BOT (concepts::ImitationIntegral64Scalar <T>) >
343+ template<typename T> NBL_PARTIAL_REQ_TOP (concepts::EmulatedIntegralScalar64 <T>)
344+ struct plus_assign<T NBL_PARTIAL_REQ_BOT (concepts::EmulatedIntegralScalar64 <T>) >
345345{
346346 using type_t = T;
347347 using base_t = plus<type_t>;
@@ -354,8 +354,8 @@ struct plus_assign<T NBL_PARTIAL_REQ_BOT(concepts::ImitationIntegral64Scalar<T>)
354354 const static type_t identity;
355355};
356356
357- template<typename T> NBL_PARTIAL_REQ_TOP (concepts::ImitationIntegral64Scalar <T>)
358- struct minus_assign<T NBL_PARTIAL_REQ_BOT (concepts::ImitationIntegral64Scalar <T>) >
357+ template<typename T> NBL_PARTIAL_REQ_TOP (concepts::EmulatedIntegralScalar64 <T>)
358+ struct minus_assign<T NBL_PARTIAL_REQ_BOT (concepts::EmulatedIntegralScalar64 <T>) >
359359{
360360 using type_t = T;
361361 using base_t = minus<type_t>;
0 commit comments