File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (C) 2025 - DevSH Graphics Programming Sp. z O.O.
2+ // This file is part of the "Nabla Engine".
3+ // For conditions of distribution and use, see copyright notice in nabla.h
4+ #ifndef _NBL_BUILTIN_HLSL_PAIR_INCLUDED_
5+ #define _NBL_BUILTIN_HLSL_PAIR_INCLUDED_
6+
7+ #include "nbl/builtin/hlsl/type_traits.hlsl"
8+
9+ namespace nbl
10+ {
11+ namespace hlsl
12+ {
13+
14+ template<typename T1, typename T2>
15+ struct pair
16+ {
17+ using first_type = T1;
18+ using second_type = T2;
19+
20+ first_type first;
21+ second_type second;
22+ };
23+
24+
25+ // Helper to make a pair (similar to std::make_pair)
26+ template<typename T1, typename T2>
27+ pair<T1, T2> make_pair (T1 f, T2 s)
28+ {
29+ pair<T1, T2> p;
30+ p.first = f;
31+ p.second = s;
32+ return p;
33+ }
34+
35+ }
36+ }
37+
38+ #endif
You can’t perform that action at this time.
0 commit comments