any_function.h

May 9, 2016 ยท View on GitHub

Release is 0.8 License is Unlicense

PlatformBuild Status
Visual Studio 2013AppVeyor: Build status
GCC 4.9Travis CI: Build status

any_function.h is a single header public domain utility library for C++11.

It is intended to serve as a functional counterpart to the std::any, by providing a single, concrete class any_function which can receive almost any callable object, from function pointers to lambdas to instantiations of std::function.

This library is still under development and its API and implementation details are subject to change.

TODO

  • Retain reference/const/volatile qualification in parameter and return type metadata
  • L-value reference parameters (should work, but needs testing)
  • R-value reference parameters
  • L-value reference return types
  • R-value reference return types
  • Const/volatile qualified parameters
  • Const/volatile qualified return type
  • Mutable lambdas / stateful function objects