blob: 95203f971957e20c7ce2d79a6b25cd5f69a2c139 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "../c++/reduce_templates.hpp"
#include "../c++/test/suite.hpp"
namespace {
SAW_TEST("Templates/Group Reduction"){
using namespace saw;
struct foo {
std::string name = "foo";
};
struct bar {
std::string name = "bar";
};
struct baz {
std::string name = "baz";
};
using grp = tmpl_group<foo, bar, baz, foo, bar, foo>;
using red_grp = tmpl_group<baz, bar, foo>;
using alg_red_grp = tmpl_reduce<grp>::type;
static_assert(std::is_same_v<alg_red_grp, red_grp>, "Should be same type");
SAW_EXPECT((std::is_same_v<alg_red_grp, red_grp>), "Should be same type");
}
}
|