Dune Core Modules (2.8.0)

optional.hh
1#ifndef DUNE_COMMON_STD_OPTIONAL_HH
2#define DUNE_COMMON_STD_OPTIONAL_HH
3
4#include <cassert>
5#include <functional>
6#include <stdexcept>
7#include <type_traits>
8#include <utility>
9
10#include <optional>
11
12#warning dune/common/std/optional.hh is deprecated and will be removed after Dune 2.8.\
13 Include <optional> instead
14
15namespace Dune
16{
17
18 namespace Std
19 {
20 // In case of C++ standard >= 17 we forward optionals into our namespace
21 template< class T >
22 using optional = std::optional< T >;
23
24 using nullopt_t = std::nullopt_t;
25 using in_place_t = std::in_place_t;
26
27 namespace
28 {
29 const std::nullopt_t nullopt = std::nullopt;
30 const std::in_place_t in_place = std::in_place;
31 } // anonymous namespace
32
33 using bad_optional_access = std::bad_optional_access;
34
35 } // namespace Std
36
37} // namespace Dune
38
39#endif // #ifndef DUNE_COMMON_STD_OPTIONAL_HH
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)