OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This is a "No Compile Test" suite. |
| 6 // http://dev.chromium.org/developers/testing/no-compile-tests |
| 7 |
5 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
6 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
7 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
8 | 11 |
9 namespace { | 12 namespace { |
10 | 13 |
11 class Parent { | 14 class Parent { |
12 }; | 15 }; |
13 | 16 |
14 class Child : public Parent { | 17 class Child : public Parent { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // support would require changes to the behavior of the constructors to match | 107 // support would require changes to the behavior of the constructors to match |
105 // including the use of SFINAE to discard the type-converting constructor | 108 // including the use of SFINAE to discard the type-converting constructor |
106 // as per C++11 20.7.1.2.1.19. | 109 // as per C++11 20.7.1.2.1.19. |
107 void WontCompile() { | 110 void WontCompile() { |
108 Deleter d; | 111 Deleter d; |
109 int n; | 112 int n; |
110 scoped_ptr<int*, Deleter&> a(&n, d); | 113 scoped_ptr<int*, Deleter&> a(&n, d); |
111 } | 114 } |
112 | 115 |
113 #endif | 116 #endif |
OLD | NEW |