diff --git a/absl/functional/overload.h b/absl/functional/overload.h index 7e19e705..35eec962 100644 --- a/absl/functional/overload.h +++ b/absl/functional/overload.h @@ -23,8 +23,6 @@ // Before using this function, consider whether named function overloads would // be a better design. // -// Note: absl::Overload requires C++17. -// // Example: // // std::variant v(int32_t{1}); @@ -46,9 +44,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN -#if defined(ABSL_INTERNAL_CPLUSPLUS_LANG) && \ - ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L - template struct Overload final : T... { using T::operator()...; @@ -71,21 +66,6 @@ struct Overload final : T... { template Overload(T...) -> Overload; -#else - -namespace functional_internal { -template -constexpr bool kDependentFalse = false; -} - -template -auto Overload(T&&...) { - static_assert(functional_internal::kDependentFalse, - "Overload is only usable with C++17 or above."); -} - -#endif - ABSL_NAMESPACE_END } // namespace absl diff --git a/absl/functional/overload_test.cc b/absl/functional/overload_test.cc index fa49d298..802e11f7 100644 --- a/absl/functional/overload_test.cc +++ b/absl/functional/overload_test.cc @@ -18,16 +18,12 @@ #include #include +#include "gtest/gtest.h" #include "absl/base/config.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/variant.h" -#if defined(ABSL_INTERNAL_CPLUSPLUS_LANG) && \ - ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L - -#include "gtest/gtest.h" - namespace { TEST(OverloadTest, DispatchConsidersTypeWithAutoFallback) { @@ -209,5 +205,3 @@ TEST(OverloadTest, HasConstexprConstructor) { } } // namespace - -#endif