Boost Phoenix Library

The Boost Phoenix Library is one of the Boost Libraries. The main author is Joel de Guzman. It provides a different route to Functional Programming In Cpp. It claims to be influenced both by FC++ (Functoids In Cpp) and the Boost Lambda Library.

It also implements closures.

www.boost.org (Phoenix V3.0)

www.boost.org notes a breaking change from earlier code.

Quote from www.boost.org (not the latest version).

What really motivated the author to write Phoenix is the lack of access to a true stack-frame with local variables (closures) in all C++ FP libraries in existence so far. When emulating functions in the form of functors, the most basic ingredient is missing: local variables and a stack. Current FP libraries emulate closures using state variables in functors. In more evolved FP applications, this "poor man's closure" is simply inadequate.

It is used in the Boost Spirit Library. It uses the Boost Proto Library and Boost Fusion. It is compatible with Boost Bind.


See original on c2.com