| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ | 5 #ifndef BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ |
| 6 #define BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ | 6 #define BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/template_util.h" | 9 #include "base/template_util.h" |
| 10 #include "base/tuple.h" | 10 #include "base/tuple.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 }; | 40 }; |
| 41 #endif | 41 #endif |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 template <typename Params> | 44 template <typename Params> |
| 45 struct ParamsUseScopedRefptrCorrectly { | 45 struct ParamsUseScopedRefptrCorrectly { |
| 46 enum { value = 0 }; | 46 enum { value = 0 }; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 template <> | 49 template <> |
| 50 struct ParamsUseScopedRefptrCorrectly<Tuple<>> { | 50 struct ParamsUseScopedRefptrCorrectly<std::tuple<>> { |
| 51 enum { value = 1 }; | 51 enum { value = 1 }; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 template <typename Head, typename... Tail> | 54 template <typename Head, typename... Tail> |
| 55 struct ParamsUseScopedRefptrCorrectly<Tuple<Head, Tail...>> { | 55 struct ParamsUseScopedRefptrCorrectly<std::tuple<Head, Tail...>> { |
| 56 enum { value = !NeedsScopedRefptrButGetsRawPtr<Head>::value && | 56 enum { value = !NeedsScopedRefptrButGetsRawPtr<Head>::value && |
| 57 ParamsUseScopedRefptrCorrectly<Tuple<Tail...>>::value }; | 57 ParamsUseScopedRefptrCorrectly<std::tuple<Tail...>>::value }; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace internal | 60 } // namespace internal |
| 61 | 61 |
| 62 } // namespace base | 62 } // namespace base |
| 63 | 63 |
| 64 #endif // BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ | 64 #endif // BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ |
| OLD | NEW |