#ifndef ABSL_META_INTERNAL_CONSTEXPR_TESTING_H_
#define ABSL_META_INTERNAL_CONSTEXPR_TESTING_H_
#include <type_traits>
#include "absl/base/config.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace meta_internal {
template <typename F>
constexpr bool HasConstexprEvaluation(F f);
namespace internal_constexpr_evaluation {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuninitialized"
#endif
template <typename F>
constexpr F default_instance = default_instance<F>;
#ifdef __clang__
#pragma clang diagnostic pop
#endif
template <typename F>
constexpr std::integral_constant<bool, (default_instance<F>(), true)> Tester(
int) {
return {};
}
template <typename S>
constexpr std::false_type Tester(char) {
return {};
}
}
template <typename F>
constexpr bool HasConstexprEvaluation(F) {
return internal_constexpr_evaluation::Tester<F>(0);
}
} ABSL_NAMESPACE_END
}
#endif