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