cpp-common/bt2s: use a `using` declaration
[babeltrace.git] / src / cpp-common / bt2s / optional.hpp
index 96d003df457c25035bbca27d377e4c4c563f9b06..13f121c05a631e5f86257c551de6ea1bb77ba3ad 100644 (file)
 
 namespace bt2s {
 
-template <typename T>
-using optional = nonstd::optional<T>;
-
-using nullopt_t = nonstd::nullopt_t;
-using bad_optional_access = nonstd::bad_optional_access;
-constexpr nullopt_t nullopt {nonstd::nullopt};
-
-template <typename T>
-constexpr optional<typename std::decay<T>::type> make_optional(T&& value)
-{
-    return nonstd::make_optional(std::forward<T>(value));
-}
-
-template <typename T, typename... ArgTs>
-constexpr optional<T> make_optional(ArgTs&&...args)
-{
-    return nonstd::make_optional<T>(std::forward<ArgTs>(args)...);
-}
-
-using in_place_t = nonstd::in_place_t;
-
-template <typename T>
-inline in_place_t in_place()
-{
-    return nonstd::in_place<T>();
-}
-
-template <std::size_t K>
-inline in_place_t in_place()
-{
-    return nonstd::in_place<K>();
-}
-
-template <typename T>
-inline in_place_t in_place_type()
-{
-    return nonstd::in_place_type<T>();
-}
-
-template <std::size_t K>
-inline in_place_t in_place_index()
-{
-    return nonstd::in_place_index<K>();
-}
+using nonstd::optional;
+using nonstd::nullopt_t;
+using nonstd::bad_optional_access;
+using nonstd::nullopt;
+using nonstd::make_optional;
+using nonstd::in_place_t;
+using nonstd::in_place;
+using nonstd::in_place_type;
+using nonstd::in_place_index;
 
 } /* namespace bt2s */
 
This page took 0.023959 seconds and 4 git commands to generate.