Cosmetic changes in make_shared and make_unique

This commit is contained in:
Glen Fernandes
2014-02-10 21:04:41 -08:00
parent 5f485c2952
commit 57dc400fbf
6 changed files with 24 additions and 24 deletions

View File

@@ -14,27 +14,27 @@
#include <utility>
namespace boost {
template<typename T>
template<class T>
inline typename boost::detail::up_if_not_array<T>::type
make_unique() {
return std::unique_ptr<T>(new T());
}
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<typename T, typename... Args>
template<class T, class... Args>
inline typename boost::detail::up_if_not_array<T>::type
make_unique(Args&&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
#endif
template<typename T>
template<class T>
inline typename boost::detail::up_if_not_array<T>::type
make_unique(T&& value) {
return std::unique_ptr<T>(new T(std::move(value)));
}
template<typename T>
template<class T>
inline typename boost::detail::up_if_not_array<T>::type
make_unique_noinit() {
return std::unique_ptr<T>(new T);