#include #include "example.hpp" #if 0 /// [lazy_expression] struct na {}; template struct metafunction { typedef /*...*/ type; }; template struct compound_metafunction { typedef typename metafunction< typename metafunction::type, typename metafunction::type, /*...*/ typename metafunction::type >::type type; }; /// [lazy_expression] /// [eager_expression] template using metafunction = /*...*/; template using compound_metafunction = metafunction...>; /// [eager_expression] /// [lazy_lambda] struct first_class_metafunction { template struct apply { typedef /*...*/ type; }; }; /// [lazy_lambda] /// [eager_lambda] template using metafunction = /*...*/; using first_class_metafunction = metal::lambda; /// [eager_lambda] #endif /// [lazy_evaluation] IS_SAME(metal::invoke, void>, std::add_pointer); IS_SAME(metal::invoke, void*, char[]>, std::common_type); /// [lazy_evaluation] /// [lazy_adaptor] IS_SAME(metal::invoke, void>, void*); IS_SAME(metal::invoke, void*, char[]>, void*); /// [lazy_adaptor] /// [eval] IS_SAME(metal::eval>, void*); IS_SAME(metal::eval>, void*); /// [eval] /// [trait_adaptor] IS_SAME(metal::invoke, void*>, metal::true_); IS_SAME(metal::invoke, void()>, metal::false_); IS_SAME(metal::invoke, char[], void*>, metal::true_); IS_SAME(metal::invoke, void*, char[]>, metal::false_); /// [trait_adaptor] /// [as_number] IS_SAME(metal::as_number>, metal::true_); IS_SAME(metal::as_number>, metal::false_); IS_SAME(metal::as_number>, metal::true_); IS_SAME(metal::as_number>, metal::false_); /// [as_number]