2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
|
|
|
Copyright (c) 2011-2013 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)
|
|
|
|
=============================================================================*/
|
2011-11-13 08:54:38 +00:00
|
|
|
#ifndef SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP
|
|
|
|
#define SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <sprout/config.hpp>
|
2013-11-22 12:11:08 +00:00
|
|
|
#include <sprout/type_traits/integral_constant.hpp>
|
2011-11-13 08:54:38 +00:00
|
|
|
#include <sprout/weed/expr/expr.hpp>
|
|
|
|
#include <sprout/weed/expr/tag.hpp>
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace weed {
|
|
|
|
namespace traits {
|
|
|
|
//
|
|
|
|
// limit_of
|
|
|
|
//
|
|
|
|
template<typename T, typename Iterator, typename Context, typename = void>
|
|
|
|
struct limit_of
|
2013-11-22 12:11:08 +00:00
|
|
|
: public sprout::integral_constant<std::size_t, static_cast<std::size_t>(-1)>
|
2011-11-13 08:54:38 +00:00
|
|
|
{};
|
|
|
|
template<typename T, typename Iterator, typename Context>
|
|
|
|
struct limit_of<T const, Iterator, Context>
|
|
|
|
: public sprout::weed::traits::limit_of<T, Iterator, Context>
|
|
|
|
{};
|
|
|
|
template<typename Arg, typename Iterator, typename Context>
|
|
|
|
struct limit_of<sprout::weed::expr<sprout::weed::tag::terminal, Arg>, Iterator, Context>
|
|
|
|
: public sprout::weed::traits::limit_of<Arg, Iterator, Context>
|
|
|
|
{};
|
|
|
|
} // namespace traits
|
|
|
|
} // namespace weed
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP
|