mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
sprout/weed.hpp 追加
This commit is contained in:
parent
8103682fdb
commit
ecfc2b297a
96 changed files with 5127 additions and 0 deletions
32
sprout/weed/traits/parser/limit_of.hpp
Normal file
32
sprout/weed/traits/parser/limit_of.hpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP
|
||||
#define SPROUT_WEED_TRAITS_PARSER_LIMIT_OF_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#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
|
||||
: public std::integral_constant<std::size_t, -1>
|
||||
{};
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue