cpreh / fcppt

Freundlich's C++ toolkit

Home Page:fcppt.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fcppt

About

Freundlich's C++ Toolkit (fcppt) is a collection of libraries that aim to improve general C++ code through better typing and functional programming.

License

Boost Software License

Documentation

fcppt.org

Dependencies

Required

  • A C++-20-conforming compiler
  • CMake

Optional

Build

The build uses CMake. See our Build Guide.

Code example

void print_at_2(std::vector<int> const &_vec)
{
  fcppt::optional::reference<int const> ref{
    fcppt::container::at_optional(_vec, 2)
  };

  fcppt::optional::maybe(
    ref,
    []{ std::cout << "No value at position 2\n"; },
    [](fcppt::reference<int const> _value) { std::cout << "The value is " << _value.get() << '\n'; }
  );
}

About

Freundlich's C++ toolkit

fcppt.org

License:Boost Software License 1.0


Languages

Language:C++ 97.0%Language:CMake 2.3%Language:C 0.6%Language:Shell 0.0%Language:Nix 0.0%