summaryrefslogtreecommitdiffstats
path: root/base/template_util.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 09:31:33 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 09:31:33 +0000
commitf258ba2e2403ada7c5c72fb9950637ddea86a014 (patch)
treefe4f332f054a99bc10b9d781f0723adabd0055d8 /base/template_util.h
parent968ca7b38235bdcae6ec82173e1fe01bcf248eb1 (diff)
downloadchromium_src-f258ba2e2403ada7c5c72fb9950637ddea86a014.zip
chromium_src-f258ba2e2403ada7c5c72fb9950637ddea86a014.tar.gz
chromium_src-f258ba2e2403ada7c5c72fb9950637ddea86a014.tar.bz2
Revert 69243 - Reland 69237 - Fix raw_scoped_refptr_mismatch_checker.h.
Damn, missed a unittest. BUG=28083 TEST=none Review URL: http://codereview.chromium.org/3549010 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/5885001 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/5887001 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/5888001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69244 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/template_util.h')
-rw-r--r--base/template_util.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/base/template_util.h b/base/template_util.h
index 27bdb73..2cfe04c 100644
--- a/base/template_util.h
+++ b/base/template_util.h
@@ -6,8 +6,6 @@
#define BASE_TEMPLATE_UTIL_H_
#pragma once
-#include "build/build_config.h"
-
namespace base {
// template definitions from tr1
@@ -27,51 +25,6 @@ typedef integral_constant<bool, false> false_type;
template <class T> struct is_pointer : false_type {};
template <class T> struct is_pointer<T*> : true_type {};
-namespace internal {
-
-// Types small_ and big_ are guaranteed such that sizeof(small_) <
-// sizeof(big_)
-typedef char small_;
-
-struct big_ {
- small_ dummy[2];
-};
-
-#if !defined(OS_WIN)
-
-// This class is an implementation detail for is_convertible, and you
-// don't need to know how it works to use is_convertible. For those
-// who care: we declare two different functions, one whose argument is
-// of type To and one with a variadic argument list. We give them
-// return types of different size, so we can use sizeof to trick the
-// compiler into telling us which function it would have chosen if we
-// had called it with an argument of type From. See Alexandrescu's
-// _Modern C++ Design_ for more details on this sort of trick.
-
-template <typename From, typename To>
-struct ConvertHelper {
- static small_ Test(To);
- static big_ Test(...);
- static From Create();
-};
-
-#endif // !defined(OS_WIN)
-
-} // namespace internal
-
-#if !defined(OS_WIN)
-
-// Inherits from true_type if From is convertible to To, false_type otherwise.
-template <typename From, typename To>
-struct is_convertible
- : integral_constant<bool,
- sizeof(internal::ConvertHelper<From, To>::Test(
- internal::ConvertHelper<From, To>::Create()))
- == sizeof(internal::small_)> {
-};
-
-#endif // !defined(OS_WIN)
-
} // namespace base
#endif // BASE_TEMPLATE_UTIL_H_