optional.hpp
Go to the documentation of this file.
1 #pragma once
2 
11 #if __has_include(<optional>) && __cplusplus >= 201703L
12 #include <optional>
13 namespace cras
14 {
15  using ::std::optional;
16  using ::std::bad_optional_access;
17  using ::std::nullopt;
18 }
19 #else
20 #include <cras_cpp_common/external/tl/optional.hpp>
21 namespace cras
22 {
23  using ::tl::optional;
24  using ::tl::bad_optional_access;
25  using ::tl::nullopt;
26 }
27 #endif
28 
29 #include <type_traits>
30 
31 namespace cras
32 {
37 template<typename T>
38 struct is_optional : public ::std::false_type {};
39 
44 template<typename T>
45 struct is_optional<::cras::optional<T>> : public ::std::true_type {};
46 }
Type trait determining whether type T is cras::optional or not.
Definition: optional.hpp:38
Definition: any.hpp:15


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53