Skip to content

Instantly share code, notes, and snippets.

@kantoniak
Created May 1, 2017 16:16
Show Gist options
  • Save kantoniak/7be9e18b6da206709f1b9a63fdea9472 to your computer and use it in GitHub Desktop.
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