Я предполагаю, что поведение будет таким же, как у std::find, std::find_if, std::find_if_not. На этой странице упоминается следующее:
Код: Выделить всё
Exceptions
The overloads with a template parameter named ExecutionPolicy report errors as follows:
- If execution of a function invoked as part of the algorithm throws an exception and ExecutionPolicy is one of the standard policies, std::terminate is called. For any other ExecutionPolicy, the behavior is implementation-defined.
- If the algorithm fails to allocate memory, std::bad_alloc is thrown.
Код: Выделить всё
bool checkExtensionSupport(std::span availableExtensions, const char* extensionName) noexcept(?)
{
auto match = [extensionName](const vk::ExtensionProperties& p) {
return std::strcmp(p.extensionName, extensionName) == 0;
};
auto result = std::ranges::find_if(availableExtensions, match);
return result != availableExtensions.end();
}
Подробнее здесь: https://stackoverflow.com/questions/785 ... exceptions
Мобильная версия