Added missing cstddef includes and corrected the use of plain "size_t"

This commit is contained in:
Ion Gaztañaga
2014-08-24 21:17:26 +02:00
parent a9bc0876cd
commit 7797b52f61
2 changed files with 4 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
#define BOOST_MOVE_DETAIL_META_UTILS_HPP #define BOOST_MOVE_DETAIL_META_UTILS_HPP
#include <boost/move/detail/config_begin.hpp> #include <boost/move/detail/config_begin.hpp>
#include <cstddef> //for std::size_t
//Small meta-typetraits to support move //Small meta-typetraits to support move

View File

@@ -15,6 +15,7 @@
#include <boost/move/detail/workaround.hpp> #include <boost/move/detail/workaround.hpp>
#include <boost/move/utility_core.hpp> #include <boost/move/utility_core.hpp>
#include <boost/move/unique_ptr.hpp> #include <boost/move/unique_ptr.hpp>
#include <cstddef> //for std::size_t
#include <boost/move/detail/meta_utils.hpp> #include <boost/move/detail/meta_utils.hpp>
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
@@ -52,7 +53,7 @@ struct unique_ptr_if<T[]>
typedef ::boost::movelib::unique_ptr<T[]> t_is_array_of_unknown_bound; typedef ::boost::movelib::unique_ptr<T[]> t_is_array_of_unknown_bound;
}; };
template<class T, size_t N> template<class T, std::size_t N>
struct unique_ptr_if<T[N]> struct unique_ptr_if<T[N]>
{ {
typedef void t_is_array_of_known_bound; typedef void t_is_array_of_known_bound;
@@ -120,7 +121,7 @@ inline
#else #else
typename ::boost::move_detail::unique_ptr_if<T>::t_is_array_of_unknown_bound typename ::boost::move_detail::unique_ptr_if<T>::t_is_array_of_unknown_bound
#endif #endif
make_unique(size_t n) make_unique(std::size_t n)
{ {
typedef typename ::boost::move_detail::remove_extent<T>::type U; typedef typename ::boost::move_detail::remove_extent<T>::type U;
return unique_ptr<T>(new U[n]()); return unique_ptr<T>(new U[n]());