From f810b5921dde57180956b9eadf39a3a2b8cb5855 Mon Sep 17 00:00:00 2001 From: Hidehiko Abe Date: Wed, 21 Feb 2018 01:04:53 +0900 Subject: Re-uprev to r462023. Previous uprevs didn't include several CLs. This re-uprev's to the r462023. cf) Missing CLs I found. https://codereview.chromium.org/2556563002 https://codereview.chromium.org/2754483002 https://codereview.chromium.org/2171833002 https://codereview.chromium.org/2778183003 https://codereview.chromium.org/2500473002 https://codereview.chromium.org/2173523002 https://codereview.chromium.org/2666423002 https://codereview.chromium.org/2723423002 https://codereview.chromium.org/2789463002 https://codereview.chromium.org/2723083004 https://codereview.chromium.org/2637843002 https://codereview.chromium.org/2785943004 https://codereview.chromium.org/2657603004 https://codereview.chromium.org/2774363003 https://codereview.chromium.org/2776853002 https://codereview.chromium.org/2736053003 https://codereview.chromium.org/2779413002 https://codereview.chromium.org/2782503002 https://codereview.chromium.org/2782083003 https://codereview.chromium.org/2399213005 https://codereview.chromium.org/2787383002 https://codereview.chromium.org/2790523004 https://codereview.chromium.org/2787533002 https://codereview.chromium.org/2780983003 https://codereview.chromium.org/2790403003 https://codereview.chromium.org/2747673002 https://codereview.chromium.org/2778173003 https://codereview.chromium.org/2788613004 https://codereview.chromium.org/2781983003 https://codereview.chromium.org/2774223003 Bug: 73270448 Test: Built and ran libchrome_test locally. Run treehugger. Change-Id: I5e76096d4fcf660571275cce5f4a980a8bb574fe --- base/template_util.h | 61 ---------------------------------------------------- 1 file changed, 61 deletions(-) (limited to 'base/template_util.h') diff --git a/base/template_util.h b/base/template_util.h index 42552107cf..10154dbbeb 100644 --- a/base/template_util.h +++ b/base/template_util.h @@ -51,46 +51,8 @@ template struct is_non_const_reference : std::false_type {}; template struct is_non_const_reference : std::true_type {}; template struct is_non_const_reference : std::false_type {}; -// is_assignable - namespace internal { -template -struct SelectSecond { - using type = Second; -}; - -struct Any { - Any(...); -}; - -// True case: If |Lvalue| can be assigned to from |Rvalue|, then the return -// value is a true_type. -template -typename internal::SelectSecond< - decltype((std::declval() = std::declval())), - std::true_type>::type -IsAssignableTest(Lvalue&&, Rvalue&&); - -// False case: Otherwise the return value is a false_type. -template -std::false_type IsAssignableTest(internal::Any, Rvalue&&); - -// Default case: Neither Lvalue nor Rvalue is void. Uses IsAssignableTest to -// determine the type of IsAssignableImpl. -template ::value || std::is_void::value> -struct IsAssignableImpl - : public std::common_type(), - std::declval()))>::type {}; - -// Void case: Either Lvalue or Rvalue is void. Then the type of IsAssignableTest -// is false_type. -template -struct IsAssignableImpl : public std::false_type {}; - // Uses expression SFINAE to detect whether using operator<< would work. template struct SupportsOstreamOperator : std::false_type {}; @@ -102,29 +64,6 @@ struct SupportsOstreamOperator -struct is_assignable : public internal::IsAssignableImpl {}; - -// is_copy_assignable is true if a T const& is assignable to a T&. -// TODO(crbug.com/554293): Remove this when all platforms have this in the std -// namespace. -template -struct is_copy_assignable - : public is_assignable::type, - typename std::add_lvalue_reference< - typename std::add_const::type>::type> {}; - -// is_move_assignable is true if a T&& is assignable to a T&. -// TODO(crbug.com/554293): Remove this when all platforms have this in the std -// namespace. -template -struct is_move_assignable - : public is_assignable::type, - const typename std::add_rvalue_reference::type> { -}; - // underlying_type produces the integer type backing an enum type. // TODO(crbug.com/554293): Remove this when all platforms have this in the std // namespace. -- cgit v1.2.3