Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: base/memory/raw_scoped_refptr_mismatch_checker.h

Issue 1695503002: Expand base::Tuple to std::tuple in a class template specialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698