2
3
4
5
6
7
8
11#ifndef _GLSL_STRUCT_LAYOUT_CHECKS_HPP_
12 #define _GLSL_STRUCT_LAYOUT_CHECKS_HPP_
14 #include <glslstruct/config.hpp>
17_GLSL_STRUCT_ERROR(
"This is only available for c++17 and greater!");
20 #include <glslstruct/layout/traits/layout_traits_concept.hpp>
21 #include <glslstruct/layout/traits/scalar_layout_traits.hpp>
22 #include <glslstruct/layout/traits/std140_layout_traits.hpp>
23 #include <glslstruct/layout/traits/std430_layout_traits.hpp>
24 #include <glslstruct/type/checks/simple_checks.hpp>
28 template<layout_traits T>
30 template<
class T, std::enable_if_t<is_layout_traits_v<T>,
bool> =
true>
35
36
37
38 using std140_layout = base_layout<std140_layout_traits>;
40
41
42
43 using std430_layout = base_layout<std430_layout_traits>;
45
46
47
48 using scalar_layout = base_layout<scalar_layout_traits>;
51 #pragma region IS_LAYOUT
54
55
56
57
59 struct is_glsl_layout : std::false_type {};
62 struct is_glsl_layout<base_layout<T> > : std::true_type {};
65
66
67
68
74
75
76
77
78 template<
class T> concept glsl_layout = is_glsl_layout_v<T>;
82 #pragma region IS_SIMPLE_OR_LAYOUT
84
85
86
87
93
94
95
96
97 template<
class T> concept glsl_simple_or_layout = is_glsl_simple_or_layout_v<T>;
#define _GLSL_STRUCT_HAS_CXX20
check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using ...
Definition config.hpp:142
#define _GLSL_STRUCT_HAS_CXX17
check if compiler has c++ version greater or equal to c++17
Definition config.hpp:130
#define _GLSL_STRUCT_CONSTEXPR17
constexpr for c++17 and higher
Definition config.hpp:196