v01
This commit is contained in:
20
thirdparty/Pangolin/include/pangolin/compat/optional.h
vendored
Normal file
20
thirdparty/Pangolin/include/pangolin/compat/optional.h
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <pangolin/platform.h>
|
||||
|
||||
// Use either C++17 optional, or the standalone backwards compatible version
|
||||
#if (__cplusplus >= 201703L)
|
||||
# include <optional>
|
||||
#else
|
||||
# include <experimental/optional.hpp>
|
||||
#endif
|
||||
|
||||
namespace pangolin {
|
||||
#if (__cplusplus >= 201703L)
|
||||
template <typename T>
|
||||
using optional = std::optional<T>;
|
||||
#else
|
||||
template <typename T>
|
||||
using optional = std::experimental::optional<T>;
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user