//********************************************************
// The following code example is taken from the book
//  C++23 - The Complete Guide
//  by Nicolai M. Josuttis (www.josuttis.com)
//  http://www.cppstd23.com
//
// The code is licensed under a
//  Creative Commons Attribution 4.0 International License
//  http://creativecommons.org/licenses/by/4.0/
//********************************************************


#include <print>
#include <vector>
#include <set>
#include "processview0.hpp"

int main()
{
  std::vector vec{0, 8, 15, 11};
  std::println("{}", vec);

  std::println("{}", ProcessView{vec});
  std::println("{}", ProcessView{vec} | std::views::drop(1));

  std::println("{}", ProcessView{std::set{"tic", "tac", "toe"}});

  // not supported yet:
#ifdef NOTSUPPORTED
  std::println("{}", vec | ProcessView);
  std::println("{}", vec | ProcessView{});
  std::println("{}", vec | process);
  std::println("{}", std::set{"tic", "tac", "toe"} | process); 
#endif
}

