aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-19 19:18:48 +0100
committerAdrian Kummerlaender2015-02-19 19:18:48 +0100
commita07999f7436802f15fc21bebd083006c9e681638 (patch)
tree0292012d7f0cc721e6f4a33a7253dbd3373ea551 /test.cc
parent1528d3cc919031d04a2d140a35d9b4cff6633eba (diff)
downloadTypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.tar
TypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.tar.gz
TypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.tar.bz2
TypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.tar.lz
TypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.tar.xz
TypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.tar.zst
TypeAsValue-a07999f7436802f15fc21bebd083006c9e681638.zip
Introduced `Branch` and `Else` pair aliases for usage in `Cond`
* pure _syntax sugar_ to improve readability of `Cond` conditionals
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/test.cc b/test.cc
index 5742fb2..7a2e963 100644
--- a/test.cc
+++ b/test.cc
@@ -239,9 +239,9 @@ static_assert(
std::is_same<
tav::Int<2>,
tav::Cond<
- tav::Pair<tav::IsEqualValue<tav::Int<1>, tav::Int<2>>, tav::Int<1>>,
- tav::Pair<tav::IsEqualValue<tav::Int<2>, tav::Int<2>>, tav::Int<2>>,
- tav::Pair<tav::IsEqualValue<tav::Int<3>, tav::Int<2>>, tav::Int<3>>
+ tav::Branch<tav::IsEqualValue<tav::Int<1>, tav::Int<2>>, tav::Int<1>>,
+ tav::Branch<tav::IsEqualValue<tav::Int<2>, tav::Int<2>>, tav::Int<2>>,
+ tav::Branch<tav::IsEqualValue<tav::Int<3>, tav::Int<2>>, tav::Int<3>>
>
>::value,
"(cond ((= 1 2) 1) ((= 2 2) 2) ((= 3 2) 3)) != 2"
@@ -251,10 +251,10 @@ static_assert(
std::is_same<
tav::Int<-1>,
tav::Cond<
- tav::Pair<tav::IsEqualValue<tav::Int<1>, tav::Int<2>>, tav::Int< 1>>,
- tav::Pair<tav::IsEqualValue<tav::Int<2>, tav::Int<3>>, tav::Int< 2>>,
- tav::Pair<tav::IsEqualValue<tav::Int<3>, tav::Int<4>>, tav::Int< 3>>,
- tav::Pair<tav::Boolean<true>, tav::Int<-1>>
+ tav::Branch<tav::IsEqualValue<tav::Int<1>, tav::Int<2>>, tav::Int< 1>>,
+ tav::Branch<tav::IsEqualValue<tav::Int<2>, tav::Int<3>>, tav::Int< 2>>,
+ tav::Branch<tav::IsEqualValue<tav::Int<3>, tav::Int<4>>, tav::Int< 3>>,
+ tav::Else<tav::Int<-1>>
>
>::value,
"(cond ((= 1 2) 1) ((= 2 3) 2) ((= 3 4) 3) (else -1)) != -1"