comparison fuhtark_test/Vulkan-Headers-1.4.334/include/vulkan/vulkan_hpp_macros.hpp @ 1501:f40d9d814c08 default tip main

did: correct vulkan-api generator
author sam <sam@basx.dev>
date Wed, 26 Nov 2025 23:34:29 +0700
parents
children
comparison
equal deleted inserted replaced
1500:91c8c3b7cbf0 1501:f40d9d814c08
1 // Copyright 2015-2025 The Khronos Group Inc.
2 //
3 // SPDX-License-Identifier: Apache-2.0 OR MIT
4 //
5
6 // This header is generated from the Khronos Vulkan XML API Registry.
7
8 #ifndef VULKAN_HPP_MACROS_HPP
9 #define VULKAN_HPP_MACROS_HPP
10
11 #if defined( _MSVC_LANG )
12 # define VULKAN_HPP_CPLUSPLUS _MSVC_LANG
13 #else
14 # define VULKAN_HPP_CPLUSPLUS __cplusplus
15 #endif
16
17 #if 202002L < VULKAN_HPP_CPLUSPLUS
18 # define VULKAN_HPP_CPP_VERSION 23
19 #elif 201703L < VULKAN_HPP_CPLUSPLUS
20 # define VULKAN_HPP_CPP_VERSION 20
21 #elif 201402L < VULKAN_HPP_CPLUSPLUS
22 # define VULKAN_HPP_CPP_VERSION 17
23 #elif 201103L < VULKAN_HPP_CPLUSPLUS
24 # define VULKAN_HPP_CPP_VERSION 14
25 #elif 199711L < VULKAN_HPP_CPLUSPLUS
26 # define VULKAN_HPP_CPP_VERSION 11
27 #else
28 # error "vulkan.hpp needs at least c++ standard version 11"
29 #endif
30
31 // include headers holding feature-test macros
32 #if 20 <= VULKAN_HPP_CPP_VERSION
33 # include <version>
34 #else
35 # include <ciso646>
36 #endif
37
38 #define VULKAN_HPP_STRINGIFY2( text ) #text
39 #define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
40 #define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
41
42 #if defined( __clang__ ) || defined( __GNUC__ ) || defined( __GNUG__ )
43 # define VULKAN_HPP_COMPILE_WARNING( text ) _Pragma( VULKAN_HPP_STRINGIFY( GCC warning text ) )
44 #elif defined( _MSC_VER )
45 # define VULKAN_HPP_COMPILE_WARNING( text ) _Pragma( VULKAN_HPP_STRINGIFY( message( __FILE__ "(" VULKAN_HPP_STRINGIFY( __LINE__ ) "): warning: " text ) ) )
46 #else
47 # define VULKAN_HPP_COMPILE_WARNING( text )
48 #endif
49
50 #if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
51 # if !defined( VULKAN_HPP_NO_SMART_HANDLE )
52 # define VULKAN_HPP_NO_SMART_HANDLE
53 # endif
54 #endif
55
56 #if defined( VULKAN_HPP_NO_CONSTRUCTORS )
57 # if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
58 # define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS
59 # endif
60 # if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
61 # define VULKAN_HPP_NO_UNION_CONSTRUCTORS
62 # endif
63 #endif
64
65 #if defined( VULKAN_HPP_NO_SETTERS )
66 # if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
67 # define VULKAN_HPP_NO_STRUCT_SETTERS
68 # endif
69 # if !defined( VULKAN_HPP_NO_UNION_SETTERS )
70 # define VULKAN_HPP_NO_UNION_SETTERS
71 # endif
72 #endif
73
74 #if !defined( VULKAN_HPP_ASSERT )
75 # define VULKAN_HPP_ASSERT assert
76 #endif
77
78 #if !defined( VULKAN_HPP_ASSERT_ON_RESULT )
79 # define VULKAN_HPP_ASSERT_ON_RESULT VULKAN_HPP_ASSERT
80 #endif
81
82 #if !defined( VULKAN_HPP_STATIC_ASSERT )
83 # define VULKAN_HPP_STATIC_ASSERT static_assert
84 #endif
85
86 #if !defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL )
87 # define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1
88 #endif
89
90 #if !defined( __has_include )
91 # define __has_include( x ) false
92 #endif
93
94 #if defined( __cpp_lib_three_way_comparison ) && ( 201907 <= __cpp_lib_three_way_comparison ) && __has_include( <compare> ) && !defined( VULKAN_HPP_NO_SPACESHIP_OPERATOR )
95 # define VULKAN_HPP_HAS_SPACESHIP_OPERATOR
96 #endif
97
98 #if defined( __cpp_lib_span ) && ( 201803 <= __cpp_lib_span )
99 # define VULKAN_HPP_SUPPORT_SPAN
100 #endif
101
102 #if defined( VULKAN_HPP_CXX_MODULE ) && !( defined( __cpp_modules ) && defined( __cpp_lib_modules ) )
103 VULKAN_HPP_COMPILE_WARNING( "This is a non-conforming implementation of C++ named modules and the standard library module." )
104 #endif
105
106 #ifndef VK_USE_64_BIT_PTR_DEFINES
107 # if defined( __LP64__ ) || defined( _WIN64 ) || ( defined( __x86_64__ ) && !defined( __ILP32__ ) ) || defined( _M_X64 ) || defined( __ia64 ) || \
108 defined( _M_IA64 ) || defined( __aarch64__ ) || defined( __powerpc64__ ) || ( defined( __riscv ) && __riscv_xlen == 64 )
109 # define VK_USE_64_BIT_PTR_DEFINES 1
110 # else
111 # define VK_USE_64_BIT_PTR_DEFINES 0
112 # endif
113 #endif
114
115 // 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
116 // To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1
117 // To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0
118 #if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
119 # if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
120 # define VULKAN_HPP_TYPESAFE_CONVERSION 1
121 # endif
122 #endif
123
124 #if defined( __GNUC__ )
125 # define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ )
126 #endif
127
128 #if !defined( VULKAN_HPP_HAS_UNRESTRICTED_UNIONS )
129 # if defined( __clang__ )
130 # if __has_feature( cxx_unrestricted_unions )
131 # define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
132 # endif
133 # elif defined( __GNUC__ )
134 # if 40600 <= GCC_VERSION
135 # define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
136 # endif
137 # elif defined( _MSC_VER )
138 # if 1900 <= _MSC_VER
139 # define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
140 # endif
141 # endif
142 #endif
143
144 #if !defined( VULKAN_HPP_INLINE )
145 # if defined( __clang__ )
146 # if __has_attribute( always_inline )
147 # define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__
148 # else
149 # define VULKAN_HPP_INLINE inline
150 # endif
151 # elif defined( __GNUC__ )
152 # define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__
153 # elif defined( _MSC_VER )
154 # define VULKAN_HPP_INLINE inline
155 # else
156 # define VULKAN_HPP_INLINE inline
157 # endif
158 #endif
159
160 #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
161 # define VULKAN_HPP_TYPESAFE_EXPLICIT
162 #else
163 # define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
164 #endif
165
166 #if defined( __cpp_constexpr )
167 # define VULKAN_HPP_CONSTEXPR constexpr
168 # if 201304 <= __cpp_constexpr
169 # define VULKAN_HPP_CONSTEXPR_14 constexpr
170 # else
171 # define VULKAN_HPP_CONSTEXPR_14
172 # endif
173 # if 201603 <= __cpp_constexpr
174 # define VULKAN_HPP_CONSTEXPR_17 constexpr
175 # else
176 # define VULKAN_HPP_CONSTEXPR_17
177 # endif
178 # if ( 201907 <= __cpp_constexpr ) && ( !defined( __GNUC__ ) || ( 110400 < GCC_VERSION ) )
179 # define VULKAN_HPP_CONSTEXPR_20 constexpr
180 # else
181 # define VULKAN_HPP_CONSTEXPR_20
182 # endif
183 # define VULKAN_HPP_CONST_OR_CONSTEXPR constexpr
184 #else
185 # define VULKAN_HPP_CONSTEXPR
186 # define VULKAN_HPP_CONSTEXPR_14
187 # define VULKAN_HPP_CONST_OR_CONSTEXPR const
188 #endif
189
190 #if !defined( VULKAN_HPP_CONSTEXPR_INLINE )
191 # if 201606L <= __cpp_inline_variables
192 # define VULKAN_HPP_CONSTEXPR_INLINE VULKAN_HPP_CONSTEXPR inline
193 # else
194 # define VULKAN_HPP_CONSTEXPR_INLINE VULKAN_HPP_CONSTEXPR
195 # endif
196 #endif
197
198 #if !defined( VULKAN_HPP_NOEXCEPT )
199 # if defined( _MSC_VER ) && ( _MSC_VER <= 1800 )
200 # define VULKAN_HPP_NOEXCEPT
201 # else
202 # define VULKAN_HPP_NOEXCEPT noexcept
203 # define VULKAN_HPP_HAS_NOEXCEPT 1
204 # if defined( VULKAN_HPP_NO_EXCEPTIONS )
205 # define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS noexcept
206 # else
207 # define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
208 # endif
209 # endif
210 #endif
211
212 #if 14 <= VULKAN_HPP_CPP_VERSION
213 # define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
214 #else
215 # define VULKAN_HPP_DEPRECATED( msg )
216 #endif
217
218 #if 17 <= VULKAN_HPP_CPP_VERSION
219 # define VULKAN_HPP_DEPRECATED_17( msg ) [[deprecated( msg )]]
220 #else
221 # define VULKAN_HPP_DEPRECATED_17( msg )
222 #endif
223
224 #if ( 17 <= VULKAN_HPP_CPP_VERSION ) && !defined( VULKAN_HPP_NO_NODISCARD_WARNINGS )
225 # define VULKAN_HPP_NODISCARD [[nodiscard]]
226 # if defined( VULKAN_HPP_NO_EXCEPTIONS )
227 # define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS [[nodiscard]]
228 # else
229 # define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
230 # endif
231 #else
232 # define VULKAN_HPP_NODISCARD
233 # define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
234 #endif
235
236 #if !defined( VULKAN_HPP_NAMESPACE )
237 # define VULKAN_HPP_NAMESPACE vk
238 #endif
239
240 #if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC )
241 # if defined( VK_NO_PROTOTYPES )
242 # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
243 # else
244 # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0
245 # endif
246 #endif
247
248 #if !defined( VULKAN_HPP_STORAGE_API )
249 # if defined( VULKAN_HPP_STORAGE_SHARED )
250 # if defined( _MSC_VER )
251 # if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT )
252 # define VULKAN_HPP_STORAGE_API __declspec( dllexport )
253 # else
254 # define VULKAN_HPP_STORAGE_API __declspec( dllimport )
255 # endif
256 # elif defined( __clang__ ) || defined( __GNUC__ )
257 # if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT )
258 # define VULKAN_HPP_STORAGE_API __attribute__( ( visibility( "default" ) ) )
259 # else
260 # define VULKAN_HPP_STORAGE_API
261 # endif
262 # else
263 # define VULKAN_HPP_STORAGE_API
264 # pragma warning Unknown import / export semantics
265 # endif
266 # else
267 # define VULKAN_HPP_STORAGE_API
268 # endif
269 #endif
270
271 namespace VULKAN_HPP_NAMESPACE
272 {
273 namespace detail
274 {
275 class DispatchLoaderDynamic;
276
277 #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
278 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
279 extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
280 # endif
281 #endif
282 } // namespace detail
283 } // namespace VULKAN_HPP_NAMESPACE
284
285 #if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC_TYPE )
286 # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC_TYPE VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic
287 #endif
288 #if !defined( VULKAN_HPP_DISPATCH_LOADER_STATIC_TYPE )
289 # define VULKAN_HPP_DISPATCH_LOADER_STATIC_TYPE VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic
290 #endif
291
292 #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
293 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
294 # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC_TYPE
295 # else
296 # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE VULKAN_HPP_DISPATCH_LOADER_STATIC_TYPE
297 # endif
298 #endif
299
300 #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
301 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
302 # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic
303 # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
304 namespace VULKAN_HPP_NAMESPACE \
305 { \
306 namespace detail \
307 { \
308 VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
309 } \
310 }
311 # else
312 # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic()
313 # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
314 # endif
315 #endif
316
317 #if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER )
318 # define VULKAN_HPP_DEFAULT_ASSIGNMENT( assignment )
319 #else
320 # define VULKAN_HPP_DEFAULT_ASSIGNMENT( assignment ) = assignment
321 #endif
322 #define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT VULKAN_HPP_DEFAULT_ASSIGNMENT( VULKAN_HPP_DEFAULT_DISPATCHER )
323
324 #if !defined( VULKAN_HPP_RAII_NAMESPACE )
325 # define VULKAN_HPP_RAII_NAMESPACE raii
326 # define VULKAN_HPP_RAII_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE )
327 #endif
328
329 #endif