Add #define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS#350
Closed
hu-qing-hua wants to merge 1 commit intoKhronosGroup:mainfrom
Closed
Add #define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS#350hu-qing-hua wants to merge 1 commit intoKhronosGroup:mainfrom
hu-qing-hua wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
Collaborator
|
The tutorial code already defines this in The CMakeLists.txt. I don't think it's necessary to explicitly add this to the code here. |
Author
You're right. I'm sorry I didn't read the tutorial carefully. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After reviewing the source code, I found that
without this macro definition, a custom constructor will be added to the
vk::ApplicationInfostruct.If a constructor is added, then
vk::ApplicationInfois no longer an aggregate class. In this case, it's no longer possible to use Designated Initializers, i.e., assign values to members using.member = value.Source code path: VulkanSDK\1.4.341.1\Include\vulkan\vulkan_structs.hpp
Code excerpts:
I am using the VS 2020 Enterprise version, when I configured it exactly according to the tutorial. I discovered this problem by observing an error message in Visual Studio that reads something like "error C7555: use of designated initializers requires an aggregate class type".