Bruno Dutra wrote:
//traits example using a lazy backend ... template<typename _> using test = /*...*/ ... template<template<typename...> class f, typename... args> using is_evaluable = /*...*/
static_assert(is_evaluable<test, void>::value, ""); static_assert(!is_evaluable<test, int>::value, ""); static_assert(!is_evaluable<test, void, int>::value, "");
Where is the laziness here? The user sees test<> (an alias), is_evaluable<> (an alias), and the static asserts don't refer to anything else. If I add another metafunction (in my sense, i.e. a template alias) template<class T> using test2 = test<std::decay_t<T>>; that has no lazy test2_c backend, is_evaluable still works for it: static_assert(is_evaluable<test2, void const volatile>::value, ""); static_assert(!is_evaluable<test2, int()>::value, ""); static_assert(!is_evaluable<test2, void, int>::value, "");