Mirror reflection library 0.5.13
Classes | Namespaces | Defines

mirror/concept_check/utils.hpp File Reference

Concept checking utilities. More...

#include <mirror/config.hpp>
#include <mirror/mirror_fwd.hpp>
#include <mirror/meta_object_tags.hpp>
#include <mirror/meta_prog/is_a.hpp>
#include <mirror/meta_prog/and.hpp>
#include <mirror/preprocessor.hpp>
Include dependency graph for utils.hpp:

Go to the source code of this file.

Classes

struct  mirror::conforms_to< Tested, ConceptTag >
 Checks if the Tested type conforms to a concept. More...

Namespaces

namespace  mirror
 

All Mirror's types, classes, functions, etc. are defined in this namespace.


Defines

#define MIRROR_CONCEPT_TESTER_BEGIN(CONCEPT_TAG)
#define MIRROR_CONCEPT_TESTER_END
#define MIRROR_CONCEPT_TESTER_CONSTRAINTS(PARAM)
#define MIRROR_ASSERT_CONCEPT(TESTED, CONCEPT_TAG)
 Compile-time concept conformance assertion.

Detailed Description

Concept checking utilities.

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_CONCEPT_TESTER_BEGIN (   CONCEPT_TAG)
Value:
template <typename Tested> \
class conforms_to_helper<Tested, CONCEPT_TAG> \
{ \
private: \
    template <typename X> \
    static typename mirror::mp::is_a< \
        X, \
        CONCEPT_TAG \
    >::type category_test(X*); \
    static std::false_type category_test(...); \
    static std::false_type test(...); \
    template <class X> \
    static std::true_type test
#define MIRROR_CONCEPT_TESTER_CONSTRAINTS (   PARAM)
Value:
typedef typename MIRROR_PP_EXPAND_ARGS PARAM :: type \
        other_constraints;
#define MIRROR_CONCEPT_TESTER_END
Value:
public: \
    typedef typename mirror::mp::and_< \
        other_constraints, \
        decltype(category_test((Tested*)nullptr)), \
        decltype(test((Tested*)nullptr)) \
    >::type type; \
};

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.