diff options
author | Adrian Kummerlaender | 2015-01-29 19:13:39 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-01-29 19:13:39 +0100 |
commit | 5f98c3eb62f3085a69f8df36de663bb7c6107341 (patch) | |
tree | 9473c87198eea3cf01e7a1d0bfca48a45cdfbe03 /test.cc | |
parent | 27b991ea23f71093b274b3ff1692c47274eb4d1d (diff) | |
download | TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.tar TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.tar.gz TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.tar.bz2 TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.tar.lz TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.tar.xz TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.tar.zst TypeAsValue-5f98c3eb62f3085a69f8df36de663bb7c6107341.zip |
Added `ListOfType` list constructor alias
* enables construction of `Cons` structures using the same value type across all their elements
Diffstat (limited to 'test.cc')
-rw-r--r-- | test.cc | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -239,6 +239,24 @@ static_assert( "(list 1 2) != (cons 1 (cons 2 void))" ); +// list of type + +static_assert( + std::is_same< + tav::Cons<tav::Int<1>, void>, + tav::ListOfType<int, 1>::type + >::value, + "(list 1) != (cons 1 void)" +); + +static_assert( + std::is_same< + tav::Cons<tav::Int<1>, tav::Cons<tav::Int<2>, void>>, + tav::ListOfType<int, 1, 2>::type + >::value, + "(list 1 2) != (cons 1 (cons 2 void))" +); + // list length static_assert( |