diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-01-26 14:43:00 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-01-26 14:43:11 +0100 |
commit | 8210f97be124bdea59c0fe5953ccfd2efa51a568 (patch) | |
tree | a68b0de6d3ad6f6f4d34c4e34127817aabf5a86f | |
parent | f009e06ece3ce55b570a015b17dfb0bb78048453 (diff) |
Remove obsolete pre-C++17 workarounds in util/optional.h
-rw-r--r-- | src/util/optional.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/util/optional.h b/src/util/optional.h index f32b8b6402..d62cc69f46 100644 --- a/src/util/optional.h +++ b/src/util/optional.h @@ -1,33 +1,7 @@ #pragma once -#if __has_include(<optional>) || \ - (defined(__cpp_lib_optional) && __cpp_lib_optional >= 201606L) - -#include <optional> - -#else - -#ifdef __clang__ -#pragma clang diagnostic ignored "-Winvalid-constexpr" -#endif - -#include <experimental/optional> - -namespace std { - -using std::experimental::make_optional; -using std::experimental::nullopt; -using std::experimental::optional; - -// Workarounds for missing member functions: -// option::has_value() -> explicit operator bool() -// option::value() -> operator*() - -} // namespace std - -#endif - #include <QtDebug> +#include <optional> template<typename T> QDebug operator<<(QDebug dbg, std::optional<T> arg) { |