blob: 8558c4f2f9f9b0e0db2f35263fc04850262c72bd [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <fbl/alloc_checker.h>
#include <memory>
namespace ktl {
template <typename T, typename Deleter = ::std::default_delete<T>>
using unique_ptr = std::unique_ptr<T, Deleter>;
template <typename T, typename... Args>
unique_ptr<T> make_unique(fbl::AllocChecker* ac, Args&&... args) {
return unique_ptr<T>(new (ac) T(std::forward<Args>(args)...));
}
} // namespace ktl