mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
ThirdParty: Add optional-lite polyfill
Thanks to all who have made contributions to https://github.com/martinmoene/optional-lite
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef __ICSNEO_OPTIONAL_H_
|
||||
#define __ICSNEO_OPTIONAL_H_
|
||||
|
||||
#include "nonstd/optional.hpp"
|
||||
|
||||
/**
|
||||
* We use icsneo::optional throughout the C++ API to allow for polyfilling
|
||||
* std::optional into C++11 and C++14 environments. In a C++17 or better
|
||||
* environment, icsneo::optional will be an alias of std::optional.
|
||||
*/
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
using nonstd::optional;
|
||||
using nonstd::bad_optional_access;
|
||||
using nonstd::make_optional;
|
||||
|
||||
using nonstd::nullopt;
|
||||
using nonstd::nullopt_t;
|
||||
|
||||
} // namespace icsneo
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user