tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_EXCEPTION_EXCEPTION_HPP
4#define TETL_EXCEPTION_EXCEPTION_HPP
5
6namespace etl {
7
8struct exception {
9 constexpr exception() = default;
10
11 constexpr explicit exception(char const* what)
12 : _what{what}
13 {
14 }
15
16 [[nodiscard]] constexpr auto what() const noexcept -> char const* { return _what; }
17
18private:
19 char const* _what{nullptr};
20};
21
22} // namespace etl
23
24#endif // TETL_EXCEPTION_EXCEPTION_HPP
Definition adjacent_find.hpp:8
constexpr exception()=default
constexpr auto what() const noexcept -> char const *
Definition exception.hpp:16
constexpr exception(char const *what)
Definition exception.hpp:11