Mirror reflection library 0.5.13
Classes | Namespaces | Defines

mirror/meta_prog/traits.hpp File Reference

Meta-function template classes for getting various traits of types defined in the mp scope. More...

#include <mirror/meta_prog/forward_decl.hpp>
Include dependency graph for traits.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)

Detailed Description

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 Documentation

#define MIRROR_ASSERT_IS_A_RANGE (   EXPR,
  NAME 
)
Value:
static_assert( \
        is_range<EXPR>::value, \
        #NAME " is not a Range expression." \
    )
#define MIRROR_ASSERT_IS_A_RANGE_OR_A_META (   OBJECT,
  EXPR,
  NAME 
)
Value:
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 
)
Value:
static_assert( \
        is_optional<EXPR>::value, \
        #NAME " is not an Optional expression." \
    )

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.