diff options
author | Chris Robinson <[email protected]> | 2020-03-22 21:15:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-03-22 21:15:12 -0700 |
commit | 46234171d134b4cbca15e276c4fdb1dfbbc70fbc (patch) | |
tree | c91f18157609cb1d3203a2aba382495e8ffa5b87 /common/aloptional.h | |
parent | dc8ccc06ce2e4d7a7fec13f4e2a2bcda75ab43b9 (diff) |
Clean up some C++11-isms
Diffstat (limited to 'common/aloptional.h')
-rw-r--r-- | common/aloptional.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/aloptional.h b/common/aloptional.h index 269cba0e..f19bc288 100644 --- a/common/aloptional.h +++ b/common/aloptional.h @@ -9,7 +9,7 @@ namespace al { -#define REQUIRES(...) bool rt_=true, typename std::enable_if<rt_ && (__VA_ARGS__),bool>::type = true +#define REQUIRES(...) bool rt_=true, std::enable_if_t<rt_ && (__VA_ARGS__),bool> = true struct nullopt_t { }; struct in_place_t { }; @@ -131,8 +131,8 @@ public: }; template<typename T> -inline optional<typename std::decay<T>::type> make_optional(T&& arg) -{ return optional<typename std::decay<T>::type>{in_place, std::forward<T>(arg)}; } +inline optional<std::decay_t<T>> make_optional(T&& arg) +{ return optional<std::decay_t<T>>{in_place, std::forward<T>(arg)}; } template<typename T, typename... Args> inline optional<T> make_optional(Args&& ...args) |