template <class T>
void fail_with_type();
Template function for enforcing the compiler to display a type. Calling this template function emits a compilation error and the error message contains the T
type. It is useful for debugging template metaprograms.
#include <mpllibs/metamonad/fail_with_type.hpp>
For any t
type the following
fail_with_type<t>();
emits a compilation error and the error message contains the type t
.
MPLLIBS_METAFUNCTION(some_metafunction, (t))
((
// do something here...
));
int main()
{
using mpllibs::metamonad::box;
fail_with_type< some_metafunction<box<int>>::type >();
}
Copyright Abel Sinkovics (abel at elte dot hu) 2011. 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