merge(3p/absl): subtree merge of Abseil up to e19260f
... notably, this includes Abseil's own StatusOr type, which conflicted with our implementation (that was taken from TensorFlow). Change-Id: Ie7d6764b64055caaeb8dc7b6b9d066291e6b538f
This commit is contained in:
parent
cc27324d02
commit
082c006c04
854 changed files with 11260 additions and 5296 deletions
2
third_party/abseil_cpp/absl/meta/BUILD.bazel
vendored
2
third_party/abseil_cpp/absl/meta/BUILD.bazel
vendored
|
|
@ -24,7 +24,7 @@ load(
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
licenses(["notice"])
|
||||
|
||||
cc_library(
|
||||
name = "type_traits",
|
||||
|
|
|
|||
28
third_party/abseil_cpp/absl/meta/type_traits.h
vendored
28
third_party/abseil_cpp/absl/meta/type_traits.h
vendored
|
|
@ -219,7 +219,7 @@ using void_t = typename type_traits_internal::VoidTImpl<Ts...>::type;
|
|||
// This metafunction is designed to be a drop-in replacement for the C++17
|
||||
// `std::conjunction` metafunction.
|
||||
template <typename... Ts>
|
||||
struct conjunction;
|
||||
struct conjunction : std::true_type {};
|
||||
|
||||
template <typename T, typename... Ts>
|
||||
struct conjunction<T, Ts...>
|
||||
|
|
@ -228,9 +228,6 @@ struct conjunction<T, Ts...>
|
|||
template <typename T>
|
||||
struct conjunction<T> : T {};
|
||||
|
||||
template <>
|
||||
struct conjunction<> : std::true_type {};
|
||||
|
||||
// disjunction
|
||||
//
|
||||
// Performs a compile-time logical OR operation on the passed types (which
|
||||
|
|
@ -241,7 +238,7 @@ struct conjunction<> : std::true_type {};
|
|||
// This metafunction is designed to be a drop-in replacement for the C++17
|
||||
// `std::disjunction` metafunction.
|
||||
template <typename... Ts>
|
||||
struct disjunction;
|
||||
struct disjunction : std::false_type {};
|
||||
|
||||
template <typename T, typename... Ts>
|
||||
struct disjunction<T, Ts...> :
|
||||
|
|
@ -250,9 +247,6 @@ struct disjunction<T, Ts...> :
|
|||
template <typename T>
|
||||
struct disjunction<T> : T {};
|
||||
|
||||
template <>
|
||||
struct disjunction<> : std::false_type {};
|
||||
|
||||
// negation
|
||||
//
|
||||
// Performs a compile-time logical NOT operation on the passed type (which
|
||||
|
|
@ -616,8 +610,22 @@ using common_type_t = typename std::common_type<T...>::type;
|
|||
template <typename T>
|
||||
using underlying_type_t = typename std::underlying_type<T>::type;
|
||||
|
||||
template <typename T>
|
||||
using result_of_t = typename std::result_of<T>::type;
|
||||
|
||||
namespace type_traits_internal {
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
// std::result_of is deprecated (C++17) or removed (C++20)
|
||||
template<typename> struct result_of;
|
||||
template<typename F, typename... Args>
|
||||
struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
|
||||
#else
|
||||
template<typename F> using result_of = std::result_of<F>;
|
||||
#endif
|
||||
|
||||
} // namespace type_traits_internal
|
||||
|
||||
template<typename F>
|
||||
using result_of_t = typename type_traits_internal::result_of<F>::type;
|
||||
|
||||
namespace type_traits_internal {
|
||||
// In MSVC we can't probe std::hash or stdext::hash because it triggers a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue