2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
2018-12-30 08:25:21 +00:00
|
|
|
Copyright (c) 2011-2018 Bolero MURAKAMI
|
2013-08-08 09:54:33 +00:00
|
|
|
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)
|
|
|
|
=============================================================================*/
|
2013-02-26 01:43:27 +00:00
|
|
|
#ifndef SPROUT_CONTAINER_DEEP_INTERNAL_HPP
|
|
|
|
#define SPROUT_CONTAINER_DEEP_INTERNAL_HPP
|
|
|
|
|
|
|
|
#include <type_traits>
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/container/internal.hpp>
|
2013-03-21 13:11:40 +00:00
|
|
|
#include <sprout/type_traits/identity.hpp>
|
2013-02-26 01:43:27 +00:00
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace containers {
|
|
|
|
namespace detail {
|
|
|
|
template<typename Container, typename Prev, typename = void>
|
2015-12-09 10:54:35 +00:00
|
|
|
struct deep_internal_impl;
|
|
|
|
template<typename Container, typename Prev>
|
|
|
|
struct deep_internal_impl<
|
|
|
|
Container, Prev,
|
|
|
|
typename std::enable_if<!std::is_same<Container, Prev&&>::value>::type
|
|
|
|
>
|
2013-02-26 01:43:27 +00:00
|
|
|
: public sprout::containers::detail::deep_internal_impl<
|
|
|
|
typename sprout::containers::internal<Container>::type, Container
|
|
|
|
>
|
|
|
|
{};
|
|
|
|
template<typename Container, typename Prev>
|
|
|
|
struct deep_internal_impl<
|
|
|
|
Container, Prev,
|
|
|
|
typename std::enable_if<std::is_same<Container, Prev&&>::value>::type
|
2013-03-21 13:11:40 +00:00
|
|
|
>
|
|
|
|
: public sprout::identity<Container>
|
|
|
|
{};
|
2013-02-26 01:43:27 +00:00
|
|
|
} // namespace detail
|
|
|
|
//
|
|
|
|
// deep_internal
|
|
|
|
//
|
|
|
|
template<typename Container>
|
|
|
|
struct deep_internal
|
|
|
|
: public sprout::containers::detail::deep_internal_impl<
|
|
|
|
typename sprout::containers::internal<Container>::type, Container
|
|
|
|
>
|
|
|
|
{};
|
|
|
|
} // namespace containers
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_CONTAINER_DEEP_INTERNAL_HPP
|