Mirror reflection library 0.5.13
|
Meta-function template classes for getting various traits of types defined in the mp scope. More...
#include <mirror/meta_prog/forward_decl.hpp>
Go to the source code of this file.
Classes | |
struct | mirror::mp::is_range< T > |
This trait meta-function can be used to check if the passed type is a range. More... | |
struct | mirror::mp::is_optional< T > |
This trait meta-function can be used to check if the passed type is optional. More... | |
Namespaces | |
namespace | mirror |
All Mirror's types, classes, functions, etc. are defined in this namespace. | |
namespace | mirror::mp |
Contains the meta-programming utilities. | |
Defines | |
#define | MIRROR_ASSERT_IS_A_RANGE(EXPR, NAME) |
#define | MIRROR_ASSERT_RETURNS_RANGE(X) MIRROR_ASSERT_IS_A_RANGE(typename X::type, X) |
#define | MIRROR_ASSERT_IS_A_RANGE_OR_A_META(OBJECT, EXPR, NAME) |
#define | MIRROR_ASSERT_RETURNS_RANGE_OR_META(OBJECT, X) MIRROR_ASSERT_IS_A_RANGE_OR_A_META(OBJECT, typename X::type, X) |
#define | MIRROR_ASSERT_IS_AN_OPTIONAL(EXPR, NAME) |
#define | MIRROR_ASSERT_RETURNS_OPTIONAL(X) MIRROR_ASSERT_IS_AN_OPTIONAL(typename X::type, X) |
Meta-function template classes for getting various traits of types defined in the mp scope.
Copyright 2008-2011 Matus Chochlik. 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)
#define MIRROR_ASSERT_IS_A_RANGE | ( | EXPR, | |
NAME | |||
) |
static_assert( \
is_range<EXPR>::value, \
#NAME " is not a Range expression." \
)
#define MIRROR_ASSERT_IS_A_RANGE_OR_A_META | ( | OBJECT, | |
EXPR, | |||
NAME | |||
) |
static_assert( \ mirror::mp::is_a< \ EXPR, \ typename mirror::meta_##OBJECT##_tag \ >::value || is_range<EXPR>::value, \ #NAME " is not a Range nor a Meta" \ MIRROR_META_OBJECT_NICE_NAME_STR(OBJECT) \ " expression" \ )
#define MIRROR_ASSERT_IS_AN_OPTIONAL | ( | EXPR, | |
NAME | |||
) |
static_assert( \
is_optional<EXPR>::value, \
#NAME " is not an Optional expression." \
)