mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
bracket the exception definitions by "#ifndef VULKAN_HPP_NO_EXCEPTIONS" (#114)
This commit is contained in:
parent
c71fcac937
commit
195479de01
@ -3392,7 +3392,6 @@ R"( default: throw SystemError( make_error_code( result ) );
|
||||
}
|
||||
)";
|
||||
leaveProtect(os, enumData.protect);
|
||||
os << std::endl;
|
||||
}
|
||||
|
||||
void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleterData)
|
||||
@ -4166,10 +4165,12 @@ int main( int argc, char **argv )
|
||||
assert(it != vkData.dependencies.end());
|
||||
writeTypeEnum(ofs, vkData.enums.find(it->name)->second);
|
||||
writeEnumsToString(ofs, vkData.enums.find(it->name)->second);
|
||||
ofs << "#ifndef VULKAN_HPP_NO_EXCEPTIONS";
|
||||
ofs << exceptionHeader;
|
||||
ofs << exceptionClassesHeader;
|
||||
writeExceptionsForEnum(ofs, vkData.enums.find(it->name)->second);
|
||||
writeThrowExceptions(ofs, vkData.enums.find(it->name)->second);
|
||||
ofs << "#endif" << std::endl;
|
||||
vkData.dependencies.erase(it);
|
||||
|
||||
ofs << "} // namespace vk" << std::endl
|
||||
|
@ -498,7 +498,7 @@ namespace vk
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef VULKAN_HPP_NO_EXCEPTIONS
|
||||
#if defined(_MSC_VER) && (_MSC_VER == 1800)
|
||||
# define noexcept _NOEXCEPT
|
||||
#endif
|
||||
@ -767,7 +767,7 @@ namespace vk
|
||||
default: throw SystemError( make_error_code( result ) );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
} // namespace vk
|
||||
|
||||
namespace std
|
||||
|
Loading…
Reference in New Issue
Block a user