Piped is a single header library for C++ that features piping operator syntax similar to that of Circle compiler, but in pure C++ 20 standard, without any compiler extensions.
Simply include the piped.hpp header file in your C++ project to start using the library.
#include "piped.hpp"
#include <iostream>
using piped::$;
int main() {
auto result = $[5] || (!$ * 2) || (!$ + 3) || $; // Pipe into $ at the end to extract result
$[5] || (!$ * 2) || (!$ + 3); // Ignore result
std::cout << result << std::endl; // Output: 13
return 0;
}
For more examples, see tests.
- For more information on the Circle compiler, visit Circle Lang.
- See cache consistent version of Piped