Drop the BOOST_NO_CXX11_STD_ALIGN-undefined path

Until the merge of Boost.Config develop to master
This commit is contained in:
Glen Fernandes
2014-02-24 08:35:59 -08:00
parent 38cb523713
commit 75cab39801

View File

@@ -9,20 +9,10 @@
#ifndef BOOST_SMART_PTR_DETAIL_SP_ALIGN_HPP #ifndef BOOST_SMART_PTR_DETAIL_SP_ALIGN_HPP
#define BOOST_SMART_PTR_DETAIL_SP_ALIGN_HPP #define BOOST_SMART_PTR_DETAIL_SP_ALIGN_HPP
#include <boost/config.hpp> #include <cstddef>
#if !defined(BOOST_NO_CXX11_STD_ALIGN)
#include <memory>
#endif
namespace boost { namespace boost {
namespace detail { namespace detail {
#if !defined(BOOST_NO_CXX11_STD_ALIGN)
inline void* sp_align(std::size_t alignment, void* ptr) {
std::size_t n1 = alignment - 1;
std::align(alignment, 0, ptr, n1);
return ptr;
}
#else
inline void* sp_align(std::size_t alignment, void* ptr) { inline void* sp_align(std::size_t alignment, void* ptr) {
std::size_t n1 = (std::size_t)ptr % alignment; std::size_t n1 = (std::size_t)ptr % alignment;
if (n1 != 0) { if (n1 != 0) {
@@ -30,7 +20,6 @@ namespace boost {
} }
return ptr; return ptr;
} }
#endif
} }
} }