laziness.cpp 601 B

1234567891011121314151617181920
  1. // Copyright Louis Dionne 2013-2017
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #include <boost/hana/experimental/view.hpp>
  5. #include <laws/base.hpp>
  6. #include <support/seq.hpp>
  7. namespace hana = boost::hana;
  8. using hana::test::ct_eq;
  9. struct undefined { };
  10. int main() {
  11. // Make sure we do not evaluate the function unless required
  12. auto storage = ::seq(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{});
  13. auto transformed = hana::experimental::transformed(storage, undefined{});
  14. (void)transformed;
  15. }