Index: base/macros.h |
diff --git a/base/macros.h b/base/macros.h |
index 53b3926cd2424ac355304f1110e0150696aec4ce..c5f503fbc3ae9158f82ecd3f487ac0e13bb7ae77 100644 |
--- a/base/macros.h |
+++ b/base/macros.h |
@@ -55,29 +55,6 @@ |
template <typename T, size_t N> char (&ArraySizeHelper(T (&array)[N]))[N]; |
#define arraysize(array) (sizeof(ArraySizeHelper(array))) |
- |
-// Use implicit_cast as a safe version of static_cast or const_cast |
-// for upcasting in the type hierarchy (i.e. casting a pointer to Foo |
-// to a pointer to SuperclassOfFoo or casting a pointer to Foo to |
-// a const pointer to Foo). |
-// When you use implicit_cast, the compiler checks that the cast is safe. |
-// Such explicit implicit_casts are necessary in surprisingly many |
-// situations where C++ demands an exact type match instead of an |
-// argument type convertible to a target type. |
-// |
-// The From type can be inferred, so the preferred syntax for using |
-// implicit_cast is the same as for static_cast etc.: |
-// |
-// implicit_cast<ToType>(expr) |
-// |
-// implicit_cast would have been part of the C++ standard library, |
-// but the proposal was submitted too late. It will probably make |
-// its way into the language in the future. |
-template<typename To, typename From> |
-inline To implicit_cast(From const &f) { |
- return f; |
-} |
- |
// The COMPILE_ASSERT macro can be used to verify that a compile time |
// expression is true. For example, you could use it to verify the |
// size of a static array: |