Skip to content

Commit 4c9635d

Browse files
author
kevyuu
committed
Use cpp syntax instead of portable macro wherever possible
1 parent ca2ac6f commit 4c9635d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/nbl/builtin/hlsl/functional.hlsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct reference_wrapper : enable_if_t<
9191

9292
#else // CPP
9393

94-
#define ALIAS_STD(NAME,OP) template<typename T NBL_STRUCT_CONSTRAINABLE > struct NAME : std::NAME<T> { \
94+
#define ALIAS_STD(NAME,OP) template<typename T> struct NAME : std::NAME<T> { \
9595
using type_t = T;
9696

9797
#endif
@@ -136,7 +136,7 @@ ALIAS_STD(divides,/)
136136

137137
#ifndef __HLSL_VERSION
138138

139-
template<typename T NBL_STRUCT_CONSTRAINABLE >
139+
template<typename T>
140140
struct bit_not : std::bit_not<T>
141141
{
142142
using type_t = T;
@@ -184,11 +184,11 @@ ALIAS_STD(less_equal, <=) };
184184
// GLM doesn't have operators on vectors
185185
#ifndef __HLSL_VERSION
186186

187-
#define NBL_COMPARISON_VECTORIAL_SPECIALIZATION(NAME, OP, GLM_OP) template<typename T> NBL_PARTIAL_REQ_TOP(concepts::Vectorial<T>)\
188-
struct NAME <T NBL_PARTIAL_REQ_BOT(concepts::Vectorial<T>) >\
187+
#define NBL_COMPARISON_VECTORIAL_SPECIALIZATION(NAME, OP, GLM_OP) template<typename T> requires (concepts::Vectorial<T>)\
188+
struct NAME <T>\
189189
{\
190190
using type_t = T;\
191-
vector<bool, vector_traits<T>::Dimension> operator()(NBL_CONST_REF_ARG(T) lhs, NBL_CONST_REF_ARG(T) rhs)\
191+
vector<bool, vector_traits<T>::Dimension> operator()(const T& lhs, const T& rhs)\
192192
{\
193193
return glm::GLM_OP (lhs, rhs);\
194194
}\

0 commit comments

Comments
 (0)