DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
isFatal.hpp
Go to the documentation of this file.
1// Copyright (c) 2020-2025 Cody R. Drisko. All rights reserved.
2// Licensed under the MIT License. See the LICENSE file in the project root for more information.
3//
4// Name: isFatal.hpp
5// Author: crdrisko
6// Date: 08/26/2020-14:26:29
7// Description: Type trait used to determine whether a given ErrorSeverity is fatal or not
8
9#ifndef DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_ERRORS_TRAITS_ISFATAL_HPP
10#define DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_ERRORS_TRAITS_ISFATAL_HPP
11
12#include <type_traits>
13
15
16namespace CppUtils::Errors
17{
24 template<ErrorSeverity Severity>
25 struct is_fatal : std::false_type
26 {
27 };
28
33 template<>
34 struct is_fatal<ErrorSeverity::Fatal> : std::true_type
35 {
36 };
37
39 template<ErrorSeverity Severity>
41} // namespace CppUtils::Errors
42
43#endif
Definition fatalException.hpp:20
ErrorSeverity
Definition errorTypes.hpp:22
@ Fatal
Describes the severity of a fatal, non-recoverable error.
Definition errorTypes.hpp:24
constexpr bool is_fatal_v
Convenience variable template for ease-of-use.
Definition isFatal.hpp:40
Definition isFatal.hpp:26