Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef BASE_TEMPLATE_UTIL_H_ |
| 6 | #define BASE_TEMPLATE_UTIL_H_ |
| 7 | |
Vitaly Buka | 8750b27 | 2015-08-18 18:39:08 -0700 | [diff] [blame] | 8 | #include <type_traits> |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 9 | |
Alex Vakulenko | f1fa8be | 2015-12-08 12:38:56 -0800 | [diff] [blame] | 10 | #include "build/build_config.h" |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 11 | |
| 12 | namespace base { |
| 13 | |
Vitaly Buka | 8750b27 | 2015-08-18 18:39:08 -0700 | [diff] [blame] | 14 | template <class T> struct is_non_const_reference : std::false_type {}; |
| 15 | template <class T> struct is_non_const_reference<T&> : std::true_type {}; |
| 16 | template <class T> struct is_non_const_reference<const T&> : std::false_type {}; |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 17 | |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 18 | } // namespace base |
| 19 | |
| 20 | #endif // BASE_TEMPLATE_UTIL_H_ |