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

Side by Side Diff: base/memory/scoped_ptr_unittest.nc

Issue 9283028: Add scoped_ptr<>::PassAs<>(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h"
7
8 namespace {
9
10 class Parent {
11 };
12
13 class Child : public Parent {
14 };
15
16 } // namespace
17
18 #if defined(NCTEST_NO_PASSAS_DOWNCAST) // [r"invalid conversion from"]
19
20 scoped_ptr<Child> DowncastUsingPassAs(scoped_ptr<Parent> object) {
21 return object.PassAs<Child>();
22 }
23
24 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698