tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
implementation.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_VERSION_IMPLEMENTATION_HPP
5#define TETL_VERSION_IMPLEMENTATION_HPP
6
7namespace etl {
8
9enum struct implementation {
10 freestanding = 0,
11 hosted = 1,
12};
13
14#if defined(__STDC_HOSTED__)
15inline constexpr auto current_implementation = implementation::hosted;
16#else
18#endif
19
20[[nodiscard]] consteval auto is_hosted() noexcept -> bool
21{
22 return current_implementation == implementation::hosted;
23}
24
25[[nodiscard]] consteval auto is_freestanding() noexcept -> bool
26{
27 return current_implementation == implementation::freestanding;
28}
29} // namespace etl
30
31#endif // TETL_VERSION_IMPLEMENTATION_HPP
Definition adjacent_find.hpp:9
consteval auto is_hosted() noexcept -> bool
Definition implementation.hpp:20
implementation
Definition implementation.hpp:9
consteval auto is_freestanding() noexcept -> bool
Definition implementation.hpp:25