// @HEADER // ***************************************************************************** // Sacado Package // // Copyright 2006 NTESS and the Sacado contributors. // SPDX-License-Identifier: LGPL-2.1-or-later // ***************************************************************************** // @HEADER #ifndef SACADO_MPL_VECTOR_HPP #define SACADO_MPL_VECTOR_HPP #include "Sacado_ConfigDefs.h" #include "Sacado_mpl_none.hpp" #include "Sacado_mpl_size.hpp" #include "Sacado_mpl_begin.hpp" #include "Sacado_mpl_end.hpp" #include "Sacado_mpl_next.hpp" #include "Sacado_mpl_push_back.hpp" #include "Sacado_mpl_at.hpp" #include "Sacado_mpl_deref.hpp" // Specializations needed for various mpl operations #include "Sacado_mpl_vector_size_spec.hpp" namespace Sacado { namespace mpl { // vector tag for mpl operations struct vector_tag {}; // vector template struct vector : vector_size { typedef vector_tag tag; typedef vector type; }; // iterator template struct vector_iterator { static const int value = Pos; }; // size template <> struct size_impl { template struct apply { static const int value = Vector::sz; }; }; // begin template <> struct begin_impl { template struct apply { typedef vector_iterator type; }; }; // end template <> struct end_impl { template struct apply { typedef vector_iterator type; }; }; // next template struct next< vector_iterator > { typedef vector_iterator type; }; // deref template struct deref< vector_iterator > : mpl::at {}; } } #include "Sacado_mpl_vector_at_spec.hpp" #include "Sacado_mpl_vector_push_back_spec.hpp" namespace Sacado { namespace mpl { // at template struct at_impl { template struct apply : vector_at {}; }; // push_back template <> struct push_back_impl { template struct apply : vector_push_back {}; }; } } #endif