From: David Wells Date: Thu, 5 Mar 2020 15:20:02 +0000 (-0500) Subject: Add a missing boost header. X-Git-Tag: v9.2.0-rc1~456^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9625%2Fhead;p=dealii.git Add a missing boost header. --- diff --git a/bundled/boost-1.70.0/include/boost/multi_array/allocators.hpp b/bundled/boost-1.70.0/include/boost/multi_array/allocators.hpp new file mode 100644 index 0000000000..469146464a --- /dev/null +++ b/bundled/boost-1.70.0/include/boost/multi_array/allocators.hpp @@ -0,0 +1,72 @@ +// Copyright 2018 Glen Joseph Fernandes +// (glenjofe@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MULTI_ARRAY_ALLOCATORS_HPP +#define BOOST_MULTI_ARRAY_ALLOCATORS_HPP + +#include +#if !defined(BOOST_NO_CXX11_ALLOCATOR) +#include +#else +#include +#endif + +namespace boost { +namespace detail { +namespace multi_array { + +template +inline void destroy(A& allocator, T* ptr, T* end) +{ + for (; ptr != end; ++ptr) { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + std::allocator_traits::destroy(allocator,ptr); +#else + ptr->~T(); +#endif + } +} + +template +inline void construct(A& allocator, T* ptr) +{ +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + std::allocator_traits::construct(allocator,ptr); +#else + ::new(static_cast(ptr)) T(); +#endif +} + +#if !defined(BOOST_NO_EXCEPTIONS) +template +inline void construct(A& allocator, T* ptr, T* end) +{ + T* start = ptr; + try { + for (; ptr != end; ++ptr) { + boost::detail::multi_array::construct(allocator,ptr); + } + } catch (...) { + boost::detail::multi_array::destroy(allocator,start,ptr); + throw; + } +} +#else +template +inline void construct(A& allocator, T* ptr, T* end) +{ + for (; ptr != end; ++ptr) { + boost::detail::multi_array::construct(allocator,ptr); + } +} +#endif + +} // multi_array +} // detail +} // boost + +#endif