mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-10 14:44:11 +00:00
add array_sub template
This commit is contained in:
parent
0f210dee5f
commit
2ebfc158b9
3 changed files with 35 additions and 5 deletions
32
sprout/sub_array/array_sub.hpp
Normal file
32
sprout/sub_array/array_sub.hpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*=============================================================================
|
||||
Copyright (c) 2011-2016 Bolero MURAKAMI
|
||||
https://github.com/bolero-MURAKAMI/Sprout
|
||||
|
||||
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 SPROUT_SUB_ARRAY_ARRAY_SUB_HPP
|
||||
#define SPROUT_SUB_ARRAY_ARRAY_SUB_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/workaround/std/cstddef.hpp>
|
||||
#include <sprout/array/array.hpp>
|
||||
#include <sprout/sub_array/sub_array.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// array_sub
|
||||
//
|
||||
template<typename T, std::size_t N>
|
||||
struct array_sub
|
||||
: public sprout::identity<sprout::sub_array<sprout::array<T, N> > >
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T, std::size_t N>
|
||||
using array_sub_t = typename sprout::array_sub<T, N>::type;
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_SUB_ARRAY_ARRAY_SUB_HPP
|
Loading…
Add table
Add a link
Reference in a new issue