Skip to content

Instantly share code, notes, and snippets.

@kantoniak
Created May 1, 2017 16:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kantoniak/7be9e18b6da206709f1b9a63fdea9472 to your computer and use it in GitHub Desktop.
#ifndef OPTIONAL
#define OPTIONAL
#if __has_include(<optional>)
# include <optional>
#else
# include <experimental/optional>
namespace std {
template<typename T>
using optional = std::experimental::optional<T>;
}
#endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment