Mirror reflection library 0.5.13
|
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>
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. |
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 MIRROR_CONCEPT_TESTER_BEGIN | ( | CONCEPT_TAG | ) |
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 | ) |
typedef typename MIRROR_PP_EXPAND_ARGS PARAM :: type \ other_constraints;
#define MIRROR_CONCEPT_TESTER_END |
public: \ typedef typename mirror::mp::and_< \ other_constraints, \ decltype(category_test((Tested*)nullptr)), \ decltype(test((Tested*)nullptr)) \ >::type type; \ };