Skip to content

Commit 0b2e2f1

Browse files
author
devsh
committed
fix up type traits
1 parent a4a9fc9 commit 0b2e2f1

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

include/nbl/builtin/hlsl/type_traits.hlsl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,9 @@ namespace nbl
156156
{
157157
namespace hlsl
158158
{
159-
159+
//
160160
namespace impl
161161
{
162-
163162
template<template<class> class Trait, class T>
164163
struct base_type_forwarder : Trait<T> {};
165164

@@ -168,11 +167,14 @@ struct base_type_forwarder<Trait,vector<T,N> > : Trait<T> {};
168167

169168
template<template<class> class Trait, class T, uint16_t N, uint16_t M>
170169
struct base_type_forwarder<Trait,matrix<T,N,M> > : Trait<T> {};
171-
172170
}
173171

174-
#ifdef __HLSL_VERSION // HLSL
172+
//
173+
template<class>
174+
struct make_void { using type = void; };
175+
175176

177+
#ifdef __HLSL_VERSION // HLSL
176178

177179
#define decltype(expr) __decltype(expr)
178180

@@ -391,9 +393,6 @@ struct enable_if<true, T> : type_identity<T> {};
391393
template<class T>
392394
struct alignment_of;
393395

394-
template<class>
395-
struct make_void { using type = void; };
396-
397396
// reference stuff needed for semantics
398397

399398
// not for "human consumption"
@@ -574,9 +573,6 @@ using enable_if = std::enable_if<B, T>;
574573
template<class T>
575574
using alignment_of = std::alignment_of<T>;
576575

577-
template<typename T>
578-
using make_void_t = typename make_void<T>::type;
579-
580576
template<class T> using remove_const = std::remove_const<T>;
581577
template<class T> using remove_volatile = std::remove_volatile<T>;
582578
template<class T> using remove_cv = std::remove_cv<T>;
@@ -617,6 +613,9 @@ template<class T>
617613
NBL_CONSTEXPR uint32_t alignment_of_v = alignment_of<T>::value;
618614

619615
// Overlapping definitions
616+
template<typename T>
617+
using make_void_t = typename make_void<T>::type;
618+
620619
template<bool C, typename T, T A, T B>
621620
struct conditional_value
622621
{

0 commit comments

Comments
 (0)