bracket the exception definitions by "#ifndef VULKAN_HPP_NO_EXCEPTIONS" (#114)

This commit is contained in:
Andreas Süßenbach 2017-06-26 15:25:53 +02:00 committed by Markus Tavenrath
parent c71fcac937
commit 195479de01
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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