mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix weed type_traits
This commit is contained in:
parent
f712788cce
commit
c78e1d0e6d
27 changed files with 279 additions and 306 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <sprout/container/size.hpp>
|
||||
#include <sprout/iterator/operation.hpp>
|
||||
#include <sprout/algorithm/equal.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
#include <sprout/weed/unused.hpp>
|
||||
#include <sprout/weed/parser_result.hpp>
|
||||
#include <sprout/weed/parser/parser_base.hpp>
|
||||
|
@ -27,15 +28,13 @@ namespace sprout {
|
|||
{
|
||||
public:
|
||||
template<typename Context, typename Iterator>
|
||||
struct attribute {
|
||||
public:
|
||||
typedef sprout::weed::unused type;
|
||||
};
|
||||
struct attribute
|
||||
: public sprout::identity<sprout::weed::unused>
|
||||
{};
|
||||
template<typename Context, typename Iterator>
|
||||
struct result {
|
||||
public:
|
||||
typedef sprout::weed::parser_result<Iterator, typename attribute<Context, Iterator>::type> type;
|
||||
};
|
||||
struct result
|
||||
: public sprout::identity<sprout::weed::parser_result<Iterator, typename attribute<Context, Iterator>::type> >
|
||||
{};
|
||||
private:
|
||||
T t_;
|
||||
public:
|
||||
|
@ -102,15 +101,13 @@ namespace sprout {
|
|||
{
|
||||
public:
|
||||
template<typename Context, typename Iterator>
|
||||
struct attribute {
|
||||
public:
|
||||
typedef T type;
|
||||
};
|
||||
struct attribute
|
||||
: public sprout::identity<T>
|
||||
{};
|
||||
template<typename Context, typename Iterator>
|
||||
struct result {
|
||||
public:
|
||||
typedef sprout::weed::parser_result<Iterator, typename attribute<Context, Iterator>::type> type;
|
||||
};
|
||||
struct result
|
||||
: public sprout::identity<sprout::weed::parser_result<Iterator, typename attribute<Context, Iterator>::type> >
|
||||
{};
|
||||
private:
|
||||
T t_;
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue