Drake
drake_optional.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stx/optional.hpp>
4 
5 /// @file
6 /// Provides drake::optional as an alias for the appropriate implementation of
7 /// std::optional or std::experimental::optional or stx::optional for the C++
8 /// toolchain being used. (The alias is selected preferentially in that order,
9 /// so the most widely-compatible implementation will always be used.)
10 
11 namespace drake {
12 
13 template <typename T>
14 using optional = stx::optional<T>;
15 
16 constexpr auto nullopt = stx::nullopt;
17 
18 } // namespace drake
Definition: automotive_demo.cc:88
stx::optional< T > optional
Definition: drake_optional.h:14
constexpr auto nullopt
Definition: drake_optional.h:16