Created
September 14, 2021 00:03
-
-
Save ckerr/b5313021e52b3060f8b678152f177095 to your computer and use it in GitHub Desktop.
gcc 5.5-friendly way of including optional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !defined(__has_include) || __has_include(<optional>) | |
#include <optional> | |
#elif __has_include(<experimental/optional>) | |
#include <experimental/optional> | |
namespace std { template<typename T> using optional = experimental::optional<T>; } | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment