// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // scoped_ptr is just a type alias for std::unique_ptr. Mass conversion coming // soon (stay tuned for the PSA!), but until then, please continue using // scoped_ptr. #ifndef BASE_MEMORY_SCOPED_PTR_H_ #define BASE_MEMORY_SCOPED_PTR_H_ #include template > using scoped_ptr = std::unique_ptr; // A function to convert T* into scoped_ptr // Doing e.g. make_scoped_ptr(new FooBarBaz(arg)) is a shorter notation // for scoped_ptr >(new FooBarBaz(arg)) template scoped_ptr make_scoped_ptr(T* ptr) { return scoped_ptr(ptr); } #endif // BASE_MEMORY_SCOPED_PTR_H_