Skip to content

vitrevance/piped

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Piped

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.

Installation

Simply include the piped.hpp header file in your C++ project to start using the library.

Usage

#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.

Reference

About

Piping with placeholder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published