template<template< typename > typename Pred, typename Type>
struct tts::filter< Pred, Type >
Filter a types list by a predicate.
Using an unary predicate template, filter a types list to only keep the types for which the predicate evaluates to true.
- Template Parameters
-
| Pred | Predicate template taking a single type parameter and exposing a static boolean member value |
| Type | Types list to filter |
#define TTS_MAIN
#include <tts/tts.hpp>
template<typename T> struct small_type : std::bool_constant<(sizeof(T) < 4)>
{
};
TTS_CASE_TPL("Check types over filtered types list",
tts::filter<small_type, tts::arithmetic_types>::types_list)
<typename T>(tts::type<T>)
{
TTS_LESS(sizeof(T), 4UL);
};