|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77907 - in trunk: boost/local_function/aux_/preprocessor/traits libs/local_function/doc/html
From: lorcaminiti_at_[hidden]
Date: 2012-04-11 01:49:20
Author: lcaminiti
Date: 2012-04-11 01:49:18 EDT (Wed, 11 Apr 2012)
New Revision: 77907
URL: http://svn.boost.org/trac/boost/changeset/77907
Log:
Upd docs and added ability to specify function type and default count to NAME so to not use Boost.Typeof at all.
Added:
trunk/boost/local_function/aux_/preprocessor/traits/name.hpp (contents, props changed)
trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS.html (contents, props changed)
trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME_TPL.html (contents, props changed)
Added: trunk/boost/local_function/aux_/preprocessor/traits/name.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/local_function/aux_/preprocessor/traits/name.hpp 2012-04-11 01:49:18 EDT (Wed, 11 Apr 2012)
@@ -0,0 +1,139 @@
+
+#ifndef BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_HPP_
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_HPP_
+
+#include <boost/local_function/detail/preprocessor/keyword/recursive.hpp>
+#include <boost/local_function/detail/preprocessor/keyword/inline.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+
+// PRIVATE //
+
+// Inline and recursive qualifiers.
+
+// Precondition: !recursive01
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSUVE_2ND_CHECK_( \
+ function_type, default_count, recursive01, inline01, name) \
+ ( \
+ function_type \
+ , \
+ default_count \
+ , \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_RECURSIVE_FRONT(name) \
+ , \
+ inline01 \
+ , \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_RECURSIVE_REMOVE_FRONT(name) \
+ )
+
+// Allows for inline and recursive to appear in swapped oder.
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSUVE_2ND_( \
+ function_type, default_count, recursive01, inline01, name) \
+ BOOST_PP_IIF(recursive01, \
+ (function_type, default_count, recursive01, inline01, name) \
+ BOOST_PP_TUPLE_EAT(5) \
+ , \
+ /* going via this macro allows to error if recursive given twice */ \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSUVE_2ND_CHECK_ \
+ )(function_type, default_count, recursive01, inline01, name)
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_INLINE_( \
+ function_type, default_count, recursive01, name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSUVE_2ND_( \
+ function_type \
+ , default_count \
+ , recursive01 \
+ , BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_INLINE_FRONT(name) \
+ , BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_INLINE_REMOVE_FRONT(name) \
+ )
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSIVE_1ST_( \
+ function_type, default_count, name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_INLINE_( \
+ function_type \
+ , default_count \
+ , BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_RECURSIVE_FRONT(name) \
+ , BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_RECURSIVE_REMOVE_FRONT(name) \
+ )
+
+// Default parameter count (defaults).
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_TUPLE_( \
+ function_type, defaults_name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSIVE_1ST_(function_type, \
+ BOOST_PP_TUPLE_ELEM(2, 0, defaults_name), \
+ BOOST_PP_TUPLE_ELEM(2, 1, defaults_name))
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_SPLIT_(defaults) \
+ defaults /* trait not optional, assumed 0 when not specified */ \
+ , /* comma splits */
+
+// Precondition: name == `(default_count) ...`
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_YES_( \
+ function_type, name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_TUPLE_(function_type, ( \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_SPLIT_ name))
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_NO_( \
+ function_type, name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSIVE_1ST_(function_type, \
+ 0 /* assume no defaults if not specified */, name)
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_(ftype_name) \
+ BOOST_PP_IIF(BOOST_PP_IS_UNARY(BOOST_PP_TUPLE_ELEM(2, 1, ftype_name)), \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_YES_ \
+ , \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_NO_ \
+ )(BOOST_PP_TUPLE_ELEM(2, 0, ftype_name), \
+ BOOST_PP_TUPLE_ELEM(2, 1, ftype_name))
+
+// Function type (ftype).
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_FTYPE_SPLIT_(function_type) \
+ function_type BOOST_PP_EMPTY /* optional trait */ \
+ , /* comma splits */
+
+// Precondition: name == `(function_type) ...`
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_FTYPE_YES_(name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_DEFAULTS_(( \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_FTYPE_SPLIT_ name))
+
+#define BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_FTYPE_NO_(name) \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_RECURSIVE_1ST_( \
+ /* no function type and default specified (EMPTY) */ \
+ BOOST_PP_EMPTY, 0 /* no defaults specified */, name)
+
+// PUBLIC //
+
+// name: [(function_type)] [(default_count)] [inline] [recursive] name
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS(name) \
+ BOOST_PP_IIF(BOOST_PP_IS_UNARY(name), \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_FTYPE_YES_ \
+ , \
+ BOOST_LOCAL_FUNCTION_AUX_NAME_TRAITS_FTYPE_NO_ \
+ )(name)
+
+// Expand to `[function_type]`.
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_FUNCTION_TYPE(name_traits) \
+ BOOST_PP_TUPLE_ELEM(5, 0, name_traits)(/* expand empty */)
+
+// Expand to 0, 1, 2, ... (0 if not specified).
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_DEFAULTS(name_traits) \
+ BOOST_PP_TUPLE_ELEM(5, 1, name_traits)
+
+// Expand to 1 iff function was specified recursive.
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_IS_RECURSIVE(name_traits) \
+ BOOST_PP_TUPLE_ELEM(5, 2, name_traits)
+
+// Expand to 1 iff function was specified inline.
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_IS_INLINE(name_traits) \
+ BOOST_PP_TUPLE_ELEM(5, 3, name_traits)
+
+// Expand to (unqualified) function name.
+#define BOOST_LOCAL_FUNCTION_AUX_PP_NAME_TRAITS_FUNCTION_NAME(name_traits) \
+ BOOST_PP_TUPLE_ELEM(5, 4, name_traits)
+
+#endif // #include guard
+
Added: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS.html
==============================================================================
--- (empty file)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS.html 2012-04-11 01:49:18 EDT (Wed, 11 Apr 2012)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter 1. Boost.LocalFunction 1.0.0">
+<link rel="up" href="reference.html#header.boost.local_function.config_hpp" title="Header <boost/local_function/config.hpp>">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html" title="Macro BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX">
+<link rel="next" href="boost_localfunction/Release_Notes.html" title="Release Notes">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_localfunction/Release_Notes.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS</span></h2>
+<p>BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS</p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="reference.html#header.boost.local_function.config_hpp" title="Header <boost/local_function/config.hpp>">boost/local_function/config.hpp</a>>
+
+</span>BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS</pre></div>
+<div class="refsect1">
+<a name="id904994"></a><h2>Description</h2>
+<p>Control performance optimizations. Automatically set using Boost.Config BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS if not defined by user. 0 - no optimization, 1 - optimization. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009-2012 Lorenzo
+ Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function.config_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_localfunction/Release_Notes.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME_TPL.html
==============================================================================
--- (empty file)
+++ trunk/libs/local_function/doc/html/BOOST_LOCAL_FUNCTION_NAME_TPL.html 2012-04-11 01:49:18 EDT (Wed, 11 Apr 2012)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_NAME_TPL</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter 1. Boost.LocalFunction 1.0.0">
+<link rel="up" href="reference.html#header.boost.local_function_hpp" title="Header <boost/local_function.hpp>">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">
+<link rel="next" href="BOOST_LOCAL_FUNCTION_TYPEOF.html" title="Macro BOOST_LOCAL_FUNCTION_TYPEOF">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_NAME.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_FUNCTION_TYPEOF.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_NAME_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_NAME_TPL</span></h2>
+<p>BOOST_LOCAL_FUNCTION_NAME_TPL</p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="reference.html#header.boost.local_function_hpp" title="Header <boost/local_function.hpp>">boost/local_function.hpp</a>>
+
+</span>BOOST_LOCAL_FUNCTION_NAME_TPL(qualified_function_name)</pre></div>
+<div class="refsect1">
+<a name="id904596"></a><h2>Description</h2>
+<p>In type-dependant context. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009-2012 Lorenzo
+ Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_NAME.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local_function_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_LOCAL_FUNCTION_TYPEOF.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk