fix weed type_traits

This commit is contained in:
bolero-MURAKAMI 2013-03-25 12:43:47 +09:00
parent f712788cce
commit c78e1d0e6d
27 changed files with 279 additions and 306 deletions

View file

@ -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: