Vulkan Schnee
0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Optional.h
Go to the documentation of this file.
1
#pragma once
2
#include <optional>
3
#include <stdexcept>
4
5
namespace
EngineCore
{
6
template
<
typename
T>
7
T
UnpackOptional
(std::optional<T> var) {
8
if
(var.has_value()) {
9
return
*var;
10
}
11
else
{
12
throw
std::runtime_error(
"Failed to unpack optional value"
);
13
}
14
}
15
}
EngineCore
Log category system implementation.
Definition
CameraComponent.cpp:8
EngineCore::UnpackOptional
T UnpackOptional(std::optional< T > var)
Definition
Optional.h:7
Engine
include
Engine
Core
Optional.h
Generated by
1.14.0