Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: // Copyright 2012 John Maddock. Chris@16: // Copyright Christopher Kormanyos 2013. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: #ifndef BOOST_MP_DETAIL_DYNAMIC_ARRAY_HPP Chris@16: #define BOOST_MP_DETAIL_DYNAMIC_ARRAY_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace multiprecision { namespace backends { namespace detail Chris@16: { Chris@16: template Chris@16: struct dynamic_array : public std::vector::type> Chris@16: { Chris@16: dynamic_array() : Chris@16: std::vector::type>(static_cast::type>::size_type>(elem_number), static_cast(0)) Chris@16: { Chris@16: } Chris@16: Chris@16: value_type* data() { return &(*(this->begin())); } Chris@16: const value_type* data() const { return &(*(this->begin())); } Chris@16: }; Chris@16: } } } } // namespace boost::multiprecision::backends::detail Chris@16: Chris@16: #endif // BOOST_MP_DETAIL_DYNAMIC_ARRAY_HPP