1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 4 5<html xmlns="http://www.w3.org/1999/xhtml"> 6 <head> 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 8 9 <title>About — Boost.HigherOrderFunctions 0.6 documentation</title> 10 11 <link rel="stylesheet" href="../../_static/boostbook.css" type="text/css" /> 12 <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> 13 14 <script type="text/javascript"> 15 var DOCUMENTATION_OPTIONS = { 16 URL_ROOT: '../../', 17 VERSION: '0.6', 18 COLLAPSE_INDEX: false, 19 FILE_SUFFIX: '.html', 20 HAS_SOURCE: true, 21 SOURCELINK_SUFFIX: '.txt' 22 }; 23 </script> 24 <script type="text/javascript" src="../../_static/jquery.js"></script> 25 <script type="text/javascript" src="../../_static/underscore.js"></script> 26 <script type="text/javascript" src="../../_static/doctools.js"></script> 27 <link rel="index" title="Index" href="../../genindex.html" /> 28 <link rel="search" title="Search" href="../../search.html" /> 29 <link rel="next" title="Building" href="building.html" /> 30 <link rel="prev" title="Introduction" href="intro.html" /> 31 </head> 32 <body role="document"> 33<table cellpadding="2" width="100%"><tr> 34<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86"src="../../_static/boost.png"></td> 35</tr></table> 36 37<div class="spirit-nav"> 38<a accesskey="p" href="intro.html"><img src="../../_static/prev.png" alt="Prev"></a> 39<a accesskey="u" href="intro.html"><img src="../../_static/up.png" alt="Up"></a> 40<a accesskey="h" href="../index.html"><img src="../../_static/home.png" alt="Home"></a> 41<a accesskey="n" href="building.html"><img src="../../_static/next.png" alt="Next"></a> 42</div> 43 44 45 <div class="document"> 46 <div class="chapter"> 47 <div class="body" role="main"> 48 49 <!-- Copyright 2018 Paul Fultz II 50 Distributed under the Boost Software License, Version 1.0. 51 (http://www.boost.org/LICENSE_1_0.txt) 52--><div class="section" id="about"> 53<h1>About<a class="headerlink" href="#about" title="Permalink to this headline">¶</a></h1> 54<p>HigherOrderFunctions is a header-only C++11/C++14 library that provides utilities for functions and function objects, which can solve many problems with much simpler constructs than whats traditionally been done with metaprogramming.</p> 55<p>HigherOrderFunctions is:</p> 56<ul class="simple"> 57<li>Modern: HigherOrderFunctions takes advantages of modern C++11/C++14 features. It support both <code class="docutils literal"><span class="pre">constexpr</span></code> initialization and <code class="docutils literal"><span class="pre">constexpr</span></code> evaluation of functions. It takes advantage of type deduction, varidiac templates, and perfect forwarding to provide a simple and modern interface.</li> 58<li>Relevant: HigherOrderFunctions provides utilities for functions and does not try to implement a functional language in C++. As such, HigherOrderFunctions solves many problems relevant to C++ programmers, including initialization of function objects and lambdas, overloading with ordering, improved return type deduction, and much more.</li> 59<li>Lightweight: HigherOrderFunctions builds simple lightweight abstraction on top of function objects. It does not require subscribing to an entire framework. Just use the parts you need.</li> 60</ul> 61<p>HigherOrderFunctions is divided into three components:</p> 62<ul class="simple"> 63<li>Function Adaptors and Decorators: These enhance functions with additional capability.</li> 64<li>Functions: These return functions that achieve a specific purpose.</li> 65<li>Utilities: These are general utilities that are useful when defining or using functions</li> 66</ul> 67<p>Github: <a class="reference external" href="https://github.com/pfultz2/higherorderfunctions/">https://github.com/pfultz2/higherorderfunctions/</a></p> 68<p>Documentation: <a class="reference external" href="http://pfultz2.github.io/higherorderfunctions/doc/html/">http://pfultz2.github.io/higherorderfunctions/doc/html/</a></p> 69</div> 70<div class="section" id="motivation"> 71<h1>Motivation<a class="headerlink" href="#motivation" title="Permalink to this headline">¶</a></h1> 72<ul class="simple"> 73<li>Improve the expressiveness and capabilities of functions, including first-class citzens for function overload set, extension methods, infix operators and much more.</li> 74<li>Simplify constructs in C++ that have generally required metaprogramming</li> 75<li>Enable point-free style programming</li> 76<li>Workaround the limitations of lambdas in C++14</li> 77</ul> 78</div> 79<div class="section" id="requirements"> 80<h1>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h1> 81<p>This requires a C++11 compiler. There are no third-party dependencies. This has been tested on clang 3.5-3.8, gcc 4.6-7, and Visual Studio 2015 and 2017.</p> 82<div class="section" id="contexpr-support"> 83<h2>Contexpr support<a class="headerlink" href="#contexpr-support" title="Permalink to this headline">¶</a></h2> 84<p>Both MSVC and gcc 4.6 have limited constexpr support due to many bugs in the implementation of constexpr. However, constexpr initialization of functions is supported when using the <a class="reference internal" href="../../include/boost/hof/function.html#boost-hof-static-function"><span class="std std-ref">BOOST_HOF_STATIC_FUNCTION</span></a> and <a class="reference internal" href="../../include/boost/hof/lambda.html#boost-hof-static-lambda-function"><span class="std std-ref">BOOST_HOF_STATIC_LAMBDA_FUNCTION</span></a> constructs.</p> 85</div> 86<div class="section" id="noexcept-support"> 87<h2>Noexcept support<a class="headerlink" href="#noexcept-support" title="Permalink to this headline">¶</a></h2> 88<p>On older compilers such as gcc 4.6 and gcc 4.7, <code class="docutils literal"><span class="pre">noexcept</span></code> is not used due to many bugs in the implementation. Also, most compilers don’t support deducing <code class="docutils literal"><span class="pre">noexcept</span></code> with member function pointers. Only newer versions of gcc(4.9 and later) support this.</p> 89</div> 90</div> 91 92 93 </div> 94 </div> 95 <div class="clearer"></div> 96 </div> 97 <div class="footer" role="contentinfo"> 98 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 99 <td align="left"></td> 100 <td align="right"><div class="copyright-footer"> 101 © Copyright 2016, Paul Fultz II. 102 103 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6. 104 <p>Distributed under the Boost Software License, Version 1.0. 105 (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 106 <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 107 </p> 108 </div></td> 109 </tr></table> 110 </div> 111 </body> 112</html>