Mantid
Loading...
Searching...
No Matches
make_cow.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include <memory>
11
12/*
13 Creates a cow_ptr in-place.
14*/
15
16namespace Mantid {
17
18namespace Kernel {
19
20template <class T, class... Args> inline cow_ptr<T> make_cow(Args &&...args) {
21 return cow_ptr<T>(std::make_shared<T>(std::forward<Args>(args)...));
22}
23
24} // namespace Kernel
25} // namespace Mantid
Implements a copy on write data template.
Definition: cow_ptr.h:41
cow_ptr< T > make_cow(Args &&...args)
Definition: make_cow.h:20
Helper class which provides the Collimation Length for SANS instruments.