From 5f98c3eb62f3085a69f8df36de663bb7c6107341 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 29 Jan 2015 19:13:39 +0100 Subject: Added `ListOfType` list constructor alias * enables construction of `Cons` structures using the same value type across all their elements --- test.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test.cc') diff --git a/test.cc b/test.cc index 33d0248..cf99e8e 100644 --- a/test.cc +++ b/test.cc @@ -239,6 +239,24 @@ static_assert( "(list 1 2) != (cons 1 (cons 2 void))" ); +// list of type + +static_assert( + std::is_same< + tav::Cons, void>, + tav::ListOfType::type + >::value, + "(list 1) != (cons 1 void)" +); + +static_assert( + std::is_same< + tav::Cons, tav::Cons, void>>, + tav::ListOfType::type + >::value, + "(list 1 2) != (cons 1 (cons 2 void))" +); + // list length static_assert( -- cgit v1.2.3