TTS v3.0.0
The Tiny Test System
Loading...
Searching...
No Matches
tts::cartesian_product< L1, L2 > Struct Template Reference

Generate the Cartesian product of two type lists. More...

Detailed Description

template<typename L1, typename L2>
struct tts::cartesian_product< L1, L2 >

Generate the Cartesian product of two type lists.

Given two types lists L1 and L2, generate a new types list containing all possible combinations of types from L1 and L2 as a types<T1,T2> where T1 is from L1 and T2 is from L2.

Template Parameters
L1First types list
L2Second types list

Example

#define TTS_MAIN // No need for main()
#include <tts/tts.hpp>
TTS_CASE_TPL("Check types over cartesian product of types lists",
<typename T, typename U>(tts::type<tts::types<T, U>>)
{
TTS_GREATER_EQUAL(sizeof(T), 4UL);
TTS_LESS_EQUAL(sizeof(U), 2UL);
};