Introduce configuration flag VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC.

This commit is contained in:
asuessenbach 2021-01-12 10:04:13 +01:00
parent 7648c6e0f8
commit 983c8795e6
3 changed files with 468 additions and 456 deletions

View File

@ -532,6 +532,10 @@ This either selects the dynamic (when it's 1) or the static (when it's not 1) Di
By default, a little helper class ```DynamicLoader``` is used to dynamically load the vulkan library. If you set it to something different than 1 before including vulkan.hpp, this helper is not available, and you need to explicitly provide your own loader type for the function ```DispatchLoaderDynamic::init()```.
#### VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC
By default, the member ```m_mask``` of the ```Flags``` template class is private. This is to prevent accidentally setting a ```Flags``` with some inappropriate value. But it also prevents using a ```Flags```, or a structure holding a ```Flags```, to be used as a non-type template parameter. If you really need that functionality, and accept the reduced security, you can use this define to change the access specifier for m_mask from private to public, which allows using a ```Flags``` as a non-type template parameter.
#### VULKAN_HPP_INLINE
This is set to be the compiler-dependent attribute used to mark functions as inline. If your compiler happens to need some different attribute, you can set this define accordingly before including vulkan.hpp.

View File

@ -10250,7 +10250,11 @@ int main( int argc, char ** argv )
return m_mask;
}
#if defined(VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC)
public:
#else
private:
#endif
MaskType m_mask;
};

File diff suppressed because it is too large Load Diff