Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80860 - in sandbox/enable_if: . libs/enable_if/doc libs/enable_if/doc/html libs/enable_if/doc/html/enable_if_macros libs/enable_if/doc/html/images libs/enable_if/test
From: rivorus_at_[hidden]
Date: 2012-10-04 23:51:08


Author: matt_calabrese
Date: 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
New Revision: 80860
URL: http://svn.boost.org/trac/boost/changeset/80860

Log:
Updated tests and documentation.
Added:
   sandbox/enable_if/libs/enable_if/doc/Jamfile (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/enable_if.qbk (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/function_template_macros.qbk (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/
   sandbox/enable_if/libs/enable_if/doc/html/boostbook.css (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/
   sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/function_template_macros.html (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/type_template_macros.html (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/
   sandbox/enable_if/libs/enable_if/doc/html/images/blank.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/caution.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/draft.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/home.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/important.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/next.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/note.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/prev.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/tip.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/up.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/images/warning.png (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/index.html (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/html/standalone_HTML.manifest (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/preface.qbk (contents, props changed)
   sandbox/enable_if/libs/enable_if/doc/type_template_macros.qbk (contents, props changed)
   sandbox/enable_if/libs/enable_if/test/constructor_example.cpp (contents, props changed)
Properties modified:
   sandbox/enable_if/ (props changed)
   sandbox/enable_if/libs/enable_if/test/ (props changed)
Text files modified:
   sandbox/enable_if/libs/enable_if/test/Jamfile | 1 +
   sandbox/enable_if/libs/enable_if/test/enable_if.cpp | 5 +++--
   sandbox/enable_if/libs/enable_if/test/enable_if_expr_seq.cpp | 2 ++
   sandbox/enable_if/libs/enable_if/test/lazy_enable_if.cpp | 2 ++
   sandbox/enable_if/libs/enable_if/test/lazy_enable_if_expr_seq.cpp | 3 ++-
   sandbox/enable_if/libs/enable_if/test/type_enable_if.cpp | 2 ++
   sandbox/enable_if/libs/enable_if/test/type_enable_if_expr_seq.cpp | 2 ++
   7 files changed, 14 insertions(+), 3 deletions(-)

Added: sandbox/enable_if/libs/enable_if/doc/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/Jamfile 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,22 @@
+#==============================================================================
+# Copyright (c) 2012 Matt Calabrese
+#
+# Use, modification and distribution is subject to the Boost Software
+# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#==============================================================================
+project boost/enable_if/libs/doc ;
+import boostbook : boostbook ;
+using quickbook ;
+
+path-constant images_location : html ;
+
+boostbook standalone
+ :
+ enable_if.qbk
+ :
+ <xsl:param>toc.section.depth=5
+ <xsl:param>toc.max.depth=5
+ <xsl:param>generate.section.toc.level=5
+ ;
+

Added: sandbox/enable_if/libs/enable_if/doc/enable_if.qbk
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/enable_if.qbk 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,30 @@
+[/==============================================================================
+ Copyright (C) 2012 Matt Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================/]
+
+[library Enable_If Macros
+ [quickbook 1.6]
+ [authors [Calabrese, Matt]]
+ [copyright 2012 Matt Calabrese]
+ [purpose Macros to simplify exploitation of SFINAE]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[template boost_enable_if[] [@http://www.boost.org/doc/libs/release/libs/utility/enable_if.html =Boost.Enable_If=]]
+[template boost_lazy_enable_if[] [@http://www.boost.org/doc/libs/release/libs/utility/enable_if.html#htoc9 `boost::lazy_enable_if`]]
+[template BOOST_ENABLE_IF[] [link enable_if_macros.function_template_macros.boost_enable_if `BOOST_ENABLE_IF`]]
+[template BOOST_ENABLE_IF_EXPR[] [link enable_if_macros.function_template_macros.boost_enable_if_expr `BOOST_ENABLE_IF_EXPR`]]
+[template BOOST_TYPE_ENABLE_IF[] [link enable_if_macros.type_template_macros.boost_type_enable_if `BOOST_TYPE_ENABLE_IF`]]
+[template mpl_integral_constant[] [@http://www.boost.org/doc/libs/release/libs/mpl/doc/refmanual/integral-constant.html =Boost.MPL= Integral Constant]]
+
+[include preface.qbk]
+[include function_template_macros.qbk]
+[include type_template_macros.qbk]

Added: sandbox/enable_if/libs/enable_if/doc/function_template_macros.qbk
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/function_template_macros.qbk 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,135 @@
+[/==============================================================================
+ Copyright (C) 2011-2012 Matt Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================/]
+
+[section Function Template Macros]
+
+[section BOOST_ENABLE_IF]
+
+[heading Synopsis]
+
+ #define BOOST_ENABLE_IF_C( ... ) /* unspecified */
+ #define BOOST_ENABLE_IF( ... ) /* unspecified */
+
+ #define BOOST_DISABLE_IF_C( ... ) /* unspecified */
+ #define BOOST_DISABLE_IF( ... ) /* unspecified */
+
+[heading Usage]
+
+The `BOOST_ENABLE_IF` family of macros are function-style macros that are
+intended to be used inside of a function template argument list as a means to
+enable or disable that template based on a compile-time condition. When using
+`BOOST_ENABLE_IF`, the condition must be a compliant [mpl_integral_constant] and
+when using `BOOST_ENABLE_IF_C` the condition must be a compile-time boolean
+constant expression. `BOOST_DISABLE_IF_C` and `BOOST_DISABLE_IF` behave
+similarly only they disable the template when the condition evaluates to `true`.
+
+[note The condition provided to these macros does not need to be dependent on a
+template argument.]
+
+[heading Example]
+
+[import ../test/enable_if.cpp]
+
+[enable_if_example]
+
+[heading Advanced Example]
+
+One benefit of these macros over [boost_enable_if] are that they are easy to use
+in places that are normally difficult to exploit, such as variadic constructors
+and conversion operators.
+
+[import ../test/constructor_example.cpp]
+
+[enable_if_constructor_example]
+
+[endsect]
+
+[section BOOST_LAZY_ENABLE_IF]
+
+[heading Synopsis]
+
+ #define BOOST_LAZY_ENABLE_IF_C( condition, ... ) /* unspecified */
+ #define BOOST_LAZY_ENABLE_IF( condition, ... ) /* unspecified */
+
+ #define BOOST_LAZY_DISABLE_IF_C( condition, ... ) /* unspecified */
+ #define BOOST_LAZY_DISABLE_IF( condition, ... ) /* unspecified */
+
+[heading Usage]
+
+The `BOOST_LAZY_ENABLE_IF` family of macros are functionally similar to the
+corresponding [BOOST_ENABLE_IF] macros, only they also allow the user to
+introduce one or more named types that are evaluate if and only if the template
+is enabled. This is important when the function's return type, parameters, or
+exception specification need to refer to a type that may produce a compile-time
+error if the condition is not satisfied, or if the process of evaluating the
+type would negatively impact compile-times (in which case, the evaluation should
+be avoided when a different overload is picked). The syntax for specifying
+lazily evaluated types is `( name, definition)`. It is analogous to
+[boost_lazy_enable_if].
+
+[heading Example]
+
+[import ../test/lazy_enable_if.cpp]
+
+[lazy_enable_if_example]
+
+[endsect]
+
+[section BOOST_ENABLE_IF_EXPR]
+
+[heading Synopsis]
+
+ #define BOOST_ENABLE_IF_EXPR( ... ) /* unspecified */
+
+The `BOOST_ENABLE_IF_EXPR` macro is a function-style macro that is intended to
+be used inside of a function template argument list as a means to enable or
+disable that template based on the validity of an expression. When
+using `BOOST_ENABLE_IF_EXPR` you may pass one or more expressions. If you pass a
+single expression, it may be passed as-is. If you pass multiple expressions,
+they need to be represented as a variadic preprocessor sequence (each expression
+must be specified in their own set of parentheses with no comma in between
+them).
+
+[warning If you wish to pass in a single expression that starts with a
+parenthesized subexpression, you need to wrap that entire expression in
+parentheses, otherwise the macro will detect the argument as a variadic sequence
+and treat it as multiple expressions.]
+
+[heading Example]
+
+[import ../test/enable_if_expr_seq.cpp]
+
+[enable_if_expr_example]
+
+[endsect]
+
+[section BOOST_LAZY_ENABLE_IF_EXPR]
+
+[heading Synopsis]
+
+ #define BOOST_LAZY_ENABLE_IF_EXPR( expressions, ... ) /* unspecified */
+
+The `BOOST_LAZY_ENABLE_IF_EXPR` macro is functionally similar to the
+corresponding [BOOST_ENABLE_IF_EXPR] macro, only it also allows the user to
+introduce one or more named types that are evaluate if and only if the template
+is enabled. This is important when the function's return type, parameters, or
+exception specification need to refer to a type that may produce a compile-time
+error if the expression is not valid, or if the process of evaluating the
+type would negatively impact compile-times (in which case, the evaluation should
+be avoided when a different overload is picked). The syntax for specifying
+lazily evaluated types is `( name, definition)`.
+
+[heading Example]
+
+[import ../test/lazy_enable_if_expr_seq.cpp]
+
+[lazy_enable_if_expr_example]
+
+[endsect]
+
+[endsect]

Added: sandbox/enable_if/libs/enable_if/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/html/boostbook.css 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,646 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompany-
+ ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 9pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 9pt;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 9pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ /* Program listings in tables don't get borders */
+ td .programlisting,
+ td .screen
+ {
+ margin: 0pc 0pc 0pc 0pc;
+ padding: 0pc 0pc 0pc 0pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font-size: 140%; }
+ h2 { font-weight: bold; font-size: 140%; }
+ h3 { font-weight: bold; font-size: 130%; }
+ h4 { font-weight: bold; font-size: 120%; }
+ h5 { font-weight: normal; font-style: italic; font-size: 110%; }
+ h6 { font-weight: normal; font-style: italic; font-size: 100%; }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 130% }
+ h5 tt.computeroutput { font-size: 130% }
+ h6 tt.computeroutput { font-size: 130% }
+
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Copyright footer
+=============================================================================*/
+ .copyright-footer
+ {
+ text-align: right;
+ font-size: 70%;
+ }
+
+ .copyright-footer p
+ {
+ text-align: right;
+ font-size: 80%;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 80%;
+ line-height: 1.15;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+ /* Code on toc */
+ .toc .computeroutput { font-size: 120% }
+
+ /* No margin on nested menus */
+
+ .toc dl dl { margin: 0; }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ font-size: 9pt;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 80%;
+ }
+
+ table.simplelist
+ {
+ width: auto !important;
+ margin: 0em !important;
+ padding: 0em !important;
+ border: none !important;
+ }
+ table.simplelist td
+ {
+ margin: 0em !important;
+ padding: 0em !important;
+ text-align: left !important;
+ font-size: 9pt !important;
+ border: none !important;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 9pt; /* A little bit smaller than the main text */
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ div.variablelist
+ {
+ margin: 1em 0;
+ }
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt,
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+ div.variablelist dl dt
+ {
+ margin-bottom: 0.2em;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 0em 0em 0.5em 2em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p,
+ div.variablelist dl dd p
+ {
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ body {
+ background-color: #FFFFFF;
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #FFFFFF; }
+ .dk_grey_bkd { background-color: #999999; }
+
+ /* Links */
+ a, a .keyword, a .identifier, a .special, a .preprocessor
+ a .char, a .comment, a .string, a .number
+ {
+ color: #005a9c;
+ }
+
+ a:visited, a:visited .keyword, a:visited .identifier,
+ a:visited .special, a:visited .preprocessor a:visited .char,
+ a:visited .comment, a:visited .string, a:visited .number
+ {
+ color: #9c5a9c;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #F0F0F0;
+ border: 1px solid #DCDCDC;
+ }
+
+ .copyright-footer
+ {
+ color: #8F8F8F;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid gray;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid gray;
+ border-collapse: collapse;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid gray;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid gray;
+ }
+
+ table.simplelist tr td
+ {
+ border: none !important;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }
+
+/*=============================================================================
+ Images
+=============================================================================*/
+
+ span.inlinemediaobject img
+ {
+ vertical-align: middle;
+ }
+
+/*==============================================================================
+ Super and Subscript: style so that line spacing isn't effected, see
+ http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
+==============================================================================*/
+
+sup,
+sub {
+ height: 0;
+ line-height: 1;
+ vertical-align: baseline;
+ position: relative;
+
+}
+
+/* For internet explorer: */
+
+* html sup,
+* html sub {
+ vertical-align: bottom;
+}
+
+sup {
+ bottom: 1ex;
+}
+
+sub {
+ top: .5ex;
+}
+
+/*==============================================================================
+ Indexes: pretty much the same as the TOC.
+==============================================================================*/
+
+ .index
+ {
+ font-size: 80%;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ margin-left: 0px;
+ }
+
+ .index ul
+ {
+ padding-left: 3em;
+ }
+
+ .index p
+ {
+ padding: 2px;
+ margin: 2px;
+ }
+
+ .index-entry-level-0
+ {
+ font-weight: bold;
+ }
+
+ .index em
+ {
+ font-weight: bold;
+ }
+

Added: sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/function_template_macros.html
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/function_template_macros.html 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,375 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function Template Macros</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Enable_If Macros">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Enable_If Macros">
+<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Enable_If Macros">
+<link rel="next" href="type_template_macros.html" title="Type Template Macros">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="type_template_macros.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section enable_if_macros_function_template_macros">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="enable_if_macros.function_template_macros"></a><a class="link" href="function_template_macros.html" title="Function Template Macros">Function Template
+ Macros</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">BOOST_ENABLE_IF</span></dt>
+<dt><span class="section">BOOST_LAZY_ENABLE_IF</span></dt>
+<dt><span class="section">BOOST_ENABLE_IF_EXPR</span></dt>
+<dt><span class="section">BOOST_LAZY_ENABLE_IF_EXPR</span></dt>
+</dl></div>
+<div class="section enable_if_macros_function_template_macros_boost_enable_if">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="enable_if_macros.function_template_macros.boost_enable_if"></a><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if" title="BOOST_ENABLE_IF">BOOST_ENABLE_IF</a>
+</h3></div></div></div>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_enable_if.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_enable_if.synopsis"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_ENABLE_IF_C</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_ENABLE_IF</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_DISABLE_IF_C</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_DISABLE_IF</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+</pre>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_enable_if.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_enable_if.usage"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if.usage">Usage</a>
+ </h5>
+<p>
+ The <code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF</span></code> family
+ of macros are function-style macros that are intended to be used inside of
+ a function template argument list as a means to enable or disable that template
+ based on a compile-time condition. When using <code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF</span></code>,
+ the condition must be a compliant <a href="http://www.boost.org/doc/libs/release/libs/mpl/doc/refmanual/integral-constant.html" target="_top"><code class="literal">Boost.MPL</code>
+ Integral Constant</a> and when using <code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF_C</span></code>
+ the condition must be a compile-time boolean constant expression. <code class="computeroutput"><span class="identifier">BOOST_DISABLE_IF_C</span></code> and <code class="computeroutput"><span class="identifier">BOOST_DISABLE_IF</span></code>
+ behave similarly only they disable the template when the condition evaluates
+ to <code class="computeroutput"><span class="keyword">true</span></code>.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ The condition provided to these macros does not need to be dependent on
+ a template argument.
+ </p></td></tr>
+</table></div>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_enable_if.h2"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_enable_if.example"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if.example">Example</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">/</span><span class="keyword">bool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">is_arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
+
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="special">...</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span>
+ <span class="special">,</span> <span class="identifier">BOOST_ENABLE_IF</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">)</span>
+ <span class="special">&gt;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="identifier">T</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">not_arithmetic_t</span> <span class="special">{};</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="number">1</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"int incorrectly detected as not being arithmetic."</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="number">1.</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"double incorrectly detected as not being arithmetic."</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="identifier">not_arithmetic_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"not_arithmetic_t incorrectly detected as begin arithmetic."</span>
+ <span class="special">);</span>
+</pre>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_enable_if.h3"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_enable_if.advanced_example"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if.advanced_example">Advanced
+ Example</a>
+ </h5>
+<p>
+ One benefit of these macros over Boost.Enable_If
+ are that they are easy to use in places that are normally difficult to exploit,
+ such as variadic constructors and conversion operators.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">struct</span> <span class="identifier">constructable_with_3_arguments</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span><span class="special">...</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">BOOST_ENABLE_IF_C</span><span class="special">(</span> <span class="keyword">sizeof</span><span class="special">...(</span> <span class="identifier">T</span> <span class="special">)</span> <span class="special">==</span> <span class="number">3</span> <span class="special">)</span> <span class="special">&gt;</span>
+ <span class="identifier">constructable_with_3_arguments</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;&amp;...</span> <span class="special">);</span>
+<span class="special">};</span>
+
+<span class="identifier">constructable_with_3_arguments</span> <span class="identifier">this_will_compile</span><span class="special">(</span> <span class="number">1</span><span class="special">,</span> <span class="number">2.0</span><span class="special">,</span> <span class="char">'3'</span> <span class="special">);</span>
+<span class="comment">//constructable_with_3_arguments this_would_not_compile( 1, 2.0, '3', 4.f );</span>
+</pre>
+</div>
+<div class="section enable_if_macros_function_template_macros_boost_lazy_enable_if">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if"></a><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if" title="BOOST_LAZY_ENABLE_IF">BOOST_LAZY_ENABLE_IF</a>
+</h3></div></div></div>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_lazy_enable_if.synopsis"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_LAZY_ENABLE_IF_C</span><span class="special">(</span> <span class="identifier">condition</span><span class="special">,</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_LAZY_ENABLE_IF</span><span class="special">(</span> <span class="identifier">condition</span><span class="special">,</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_LAZY_DISABLE_IF_C</span><span class="special">(</span> <span class="identifier">condition</span><span class="special">,</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_LAZY_DISABLE_IF</span><span class="special">(</span> <span class="identifier">condition</span><span class="special">,</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+</pre>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_lazy_enable_if.usage"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if.usage">Usage</a>
+ </h5>
+<p>
+ The <code class="computeroutput"><span class="identifier">BOOST_LAZY_ENABLE_IF</span></code>
+ family of macros are functionally similar to the corresponding <a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if" title="BOOST_ENABLE_IF"><code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF</span></code></a> macros, only they
+ also allow the user to introduce one or more named types that are evaluate
+ if and only if the template is enabled. This is important when the function's
+ return type, parameters, or exception specification need to refer to a type
+ that may produce a compile-time error if the condition is not satisfied,
+ or if the process of evaluating the type would negatively impact compile-times
+ (in which case, the evaluation should be avoided when a different overload
+ is picked). The syntax for specifying lazily evaluated types is <code class="computeroutput"><span class="special">(</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">definition</span><span class="special">)</span></code>. It is analogous to boost::lazy_enable_if.
+ </p>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if.h2"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_lazy_enable_if.example"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if.example">Example</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">/</span><span class="keyword">bool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">is_arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">static_assert_if_not_arithmetic</span>
+ <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span>
+<span class="special">{</span>
+ <span class="keyword">static_assert</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"Lazy type is incorrectly instantiated."</span>
+ <span class="special">);</span>
+<span class="special">};</span>
+
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="special">...</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span>
+ <span class="special">,</span> <span class="identifier">BOOST_LAZY_ENABLE_IF</span>
+ <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="special">,</span> <span class="special">(</span> <span class="identifier">ResultType</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">static_assert_if_not_arithmetic</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="special">(</span> <span class="identifier">DefaultParamType</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">static_assert_if_not_arithmetic</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+ <span class="special">&gt;</span>
+<span class="identifier">ResultType</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">DefaultParamType</span> <span class="special">=</span> <span class="identifier">DefaultParamType</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">not_arithmetic_t</span> <span class="special">{};</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="number">1</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"int incorrectly detected as not being arithmetic."</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="number">1.</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"double incorrectly detected as not being arithmetic."</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">(</span> <span class="identifier">not_arithmetic_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"not_arithmetic_t incorrectly detected as begin arithmetic."</span>
+ <span class="special">);</span>
+</pre>
+</div>
+<div class="section enable_if_macros_function_template_macros_boost_enable_if_expr">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="enable_if_macros.function_template_macros.boost_enable_if_expr"></a><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if_expr" title="BOOST_ENABLE_IF_EXPR">BOOST_ENABLE_IF_EXPR</a>
+</h3></div></div></div>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_enable_if_expr.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_enable_if_expr.synopsis"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if_expr.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_ENABLE_IF_EXPR</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF_EXPR</span></code>
+ macro is a function-style macro that is intended to be used inside of a function
+ template argument list as a means to enable or disable that template based
+ on the validity of an expression. When using <code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF_EXPR</span></code>
+ you may pass one or more expressions. If you pass a single expression, it
+ may be passed as-is. If you pass multiple expressions, they need to be represented
+ as a variadic preprocessor sequence (each expression must be specified in
+ their own set of parentheses with no comma in between them).
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ If you wish to pass in a single expression that starts with a parenthesized
+ subexpression, you need to wrap that entire expression in parentheses,
+ otherwise the macro will detect the argument as a variadic sequence and
+ treat it as multiple expressions.
+ </p></td></tr>
+</table></div>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_enable_if_expr.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_enable_if_expr.example"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if_expr.example">Example</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">/</span><span class="keyword">bool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
+
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="special">...</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span>
+ <span class="special">,</span> <span class="identifier">BOOST_ENABLE_IF_EXPR</span>
+ <span class="special">(</span> <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span>
+ <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span>
+ <span class="special">)</span>
+ <span class="special">&gt;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">T</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_plus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">+(</span> <span class="identifier">has_plus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_minus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">-(</span> <span class="identifier">has_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_plus_and_minus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">+(</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">-(</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="number">1</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"int incorrectly detected as not having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">has_plus_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"has_plus_t incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">has_minus_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"has_minus_t incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span>
+<span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">has_plus_and_minus_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+<span class="special">,</span> <span class="string">"has_plus_and_minus_t incorrectly detected as not having plus and minus"</span>
+<span class="special">);</span>
+</pre>
+</div>
+<div class="section enable_if_macros_function_template_macros_boost_lazy_enable_if_expr">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if_expr"></a><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if_expr" title="BOOST_LAZY_ENABLE_IF_EXPR">BOOST_LAZY_ENABLE_IF_EXPR</a>
+</h3></div></div></div>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if_expr.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_lazy_enable_if_expr.synopsis"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if_expr.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_LAZY_ENABLE_IF_EXPR</span><span class="special">(</span> <span class="identifier">expressions</span><span class="special">,</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">BOOST_LAZY_ENABLE_IF_EXPR</span></code>
+ macro is functionally similar to the corresponding <a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_enable_if_expr" title="BOOST_ENABLE_IF_EXPR"><code class="computeroutput"><span class="identifier">BOOST_ENABLE_IF_EXPR</span></code></a> macro, only
+ it also allows the user to introduce one or more named types that are evaluate
+ if and only if the template is enabled. This is important when the function's
+ return type, parameters, or exception specification need to refer to a type
+ that may produce a compile-time error if the expression is not valid, or
+ if the process of evaluating the type would negatively impact compile-times
+ (in which case, the evaluation should be avoided when a different overload
+ is picked). The syntax for specifying lazily evaluated types is <code class="computeroutput"><span class="special">(</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">definition</span><span class="special">)</span></code>.
+ </p>
+<h5>
+<a name="enable_if_macros.function_template_macros.boost_lazy_enable_if_expr.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.function_template_macros.boost_lazy_enable_if_expr.example"></a></span><a class="link" href="function_template_macros.html#enable_if_macros.function_template_macros.boost_lazy_enable_if_expr.example">Example</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">/</span><span class="keyword">bool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">error_if_not_has_plus_and_minus</span>
+ <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span> <span class="identifier">error_plus</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span> <span class="identifier">error_minus</span><span class="special">;</span>
+<span class="special">};</span>
+
+
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="special">...</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span>
+ <span class="special">,</span> <span class="identifier">BOOST_LAZY_ENABLE_IF_EXPR</span>
+ <span class="special">(</span> <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span>
+ <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="special">(</span> <span class="identifier">ResultType</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">error_if_not_has_plus_and_minus</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="special">(</span> <span class="identifier">DefaultParamType</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">error_if_not_has_plus_and_minus</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+ <span class="special">&gt;</span>
+<span class="identifier">ResultType</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">DefaultParamType</span> <span class="special">=</span> <span class="identifier">DefaultParamType</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_plus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">+(</span> <span class="identifier">has_plus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_minus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">-(</span> <span class="identifier">has_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_plus_and_minus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">+(</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">-(</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="number">1</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"int incorrectly detected as not having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">has_plus_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"has_plus_t incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">has_minus_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"has_minus_t incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span>
+<span class="special">(</span> <span class="keyword">decltype</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">(</span> <span class="identifier">has_plus_and_minus_t</span><span class="special">()</span> <span class="special">)</span> <span class="special">)::</span><span class="identifier">value</span>
+<span class="special">,</span> <span class="string">"has_plus_and_minus_t incorrectly detected as not having plus and minus"</span>
+<span class="special">);</span>
+</pre>
+</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 &#169; 2012 Matt Calabrese<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="type_template_macros.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/type_template_macros.html
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/html/enable_if_macros/type_template_macros.html 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,187 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Type Template Macros</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Enable_If Macros">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Enable_If Macros">
+<link rel="prev" href="function_template_macros.html" title="Function Template Macros">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav">
+<a accesskey="p" href="function_template_macros.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+<div class="section enable_if_macros_type_template_macros">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="enable_if_macros.type_template_macros"></a><a class="link" href="type_template_macros.html" title="Type Template Macros">Type Template Macros</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">BOOST_TYPE_ENABLE_IF</span></dt>
+<dt><span class="section">BOOST_TYPE_ENABLE_IF_EXPR</span></dt>
+</dl></div>
+<div class="section enable_if_macros_type_template_macros_boost_type_enable_if">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if"></a><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if" title="BOOST_TYPE_ENABLE_IF">BOOST_TYPE_ENABLE_IF</a>
+</h3></div></div></div>
+<h5>
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.type_template_macros.boost_type_enable_if.synopsis"></a></span><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TYPE_ENABLE_IF_C</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_TYPE_ENABLE_IF</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_TYPE_DISABLE_IF_C</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_TYPE_DISABLE_IF</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+</pre>
+<h5>
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.type_template_macros.boost_type_enable_if.usage"></a></span><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if.usage">Usage</a>
+ </h5>
+<p>
+ The <code class="computeroutput"><span class="identifier">BOOST_TYPE_ENABLE_IF</span></code>
+ family of macros are function-style macros that are intended to be used inside
+ of a type template specialization pattern list as a means to enable or disable
+ that template based on a compile-time condition. When using <code class="computeroutput"><span class="identifier">BOOST_TYPE_ENABLE_IF</span></code>, the condition must
+ be a compliant <a href="http://www.boost.org/doc/libs/release/libs/mpl/doc/refmanual/integral-constant.html" target="_top"><code class="literal">Boost.MPL</code>
+ Integral Constant</a> and when using <code class="computeroutput"><span class="identifier">BOOST_TYPE_ENABLE_IF_C</span></code>
+ the condition must be a compile-time boolean constant expression. <code class="computeroutput"><span class="identifier">BOOST_TYPE_DISABLE_IF_C</span></code> and <code class="computeroutput"><span class="identifier">BOOST_TYPE_DISABLE_IF</span></code> behave similarly
+ only they disable the template specialization when the condition evaluates
+ to <code class="computeroutput"><span class="keyword">true</span></code>.
+ </p>
+<h5>
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if.h2"></a>
+ <span class="phrase"><a name="enable_if_macros.type_template_macros.boost_type_enable_if.example"></a></span><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if.example">Example</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">/</span><span class="keyword">bool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">is_arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="special">=</span> <span class="keyword">void</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_arithmetic</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="special">{};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_arithmetic</span>
+ <span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">BOOST_TYPE_ENABLE_IF</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">)</span> <span class="special">&gt;</span>
+ <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{};</span>
+
+<span class="keyword">struct</span> <span class="identifier">not_arithmetic_t</span> <span class="special">{};</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"int incorrectly detected as not being arithmetic."</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"double incorrectly detected as not being arithmetic."</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="identifier">is_arithmetic</span><span class="special">&lt;</span> <span class="identifier">not_arithmetic_t</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"not_arithmetic_t incorrectly detected as begin arithmetic."</span>
+ <span class="special">);</span>
+</pre>
+</div>
+<div class="section enable_if_macros_type_template_macros_boost_type_enable_if_expr">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if_expr"></a><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if_expr" title="BOOST_TYPE_ENABLE_IF_EXPR">BOOST_TYPE_ENABLE_IF_EXPR</a>
+</h3></div></div></div>
+<h5>
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if_expr.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.type_template_macros.boost_type_enable_if_expr.synopsis"></a></span><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if_expr.synopsis">Synopsis</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TYPE_ENABLE_IF_EXPR</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span> <span class="comment">/* unspecified */</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">BOOST_TYPE_ENABLE_IF_EXPR</span></code>
+ macro is a function-style macro that is intended to be used inside of a type
+ template specialization pattern list as a means to enable or disable that
+ specialization based on the validity of an expression. When using <code class="computeroutput"><span class="identifier">BOOST_TYPE_ENABLE_IF_EXPR</span></code> you may pass
+ one or more expressions. If you pass a single expression, it may be passed
+ as-is. If you pass multiple expressions, they need to be represented as a
+ variadic preprocessor sequence (each expression must be specified in their
+ own set of parentheses with no comma in between them).
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ If you wish to pass in a single expression that starts with a parenthesized
+ subexpression, you need to wrap that entire expression in parentheses,
+ otherwise the macro will detect the argument as a variadic sequence and
+ treat it as multiple expressions.
+ </p></td></tr>
+</table></div>
+<h5>
+<a name="enable_if_macros.type_template_macros.boost_type_enable_if_expr.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.type_template_macros.boost_type_enable_if_expr.example"></a></span><a class="link" href="type_template_macros.html#enable_if_macros.type_template_macros.boost_type_enable_if_expr.example">Example</a>
+ </h5>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">utility</span><span class="special">/</span><span class="identifier">enable_if_macros</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">/</span><span class="keyword">bool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="special">=</span> <span class="keyword">void</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">has_plus_and_minus</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="special">{};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">has_plus_and_minus</span>
+ <span class="special">&lt;</span> <span class="identifier">T</span>
+ <span class="special">,</span> <span class="identifier">BOOST_TYPE_ENABLE_IF_EXPR</span>
+ <span class="special">(</span> <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span>
+ <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">declval</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;()</span> <span class="special">)</span>
+ <span class="special">)</span>
+ <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{};</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_plus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">+(</span> <span class="identifier">has_plus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_minus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">-(</span> <span class="identifier">has_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">struct</span> <span class="identifier">has_plus_and_minus_t</span> <span class="special">{};</span>
+
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">+(</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+<span class="keyword">void</span> <span class="keyword">operator</span> <span class="special">-(</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;,</span> <span class="identifier">has_plus_and_minus_t</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="identifier">has_plus_and_minus</span><span class="special">&lt;</span> <span class="keyword">void</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"void incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"int incorrectly detected as not having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="identifier">has_plus_and_minus</span><span class="special">&lt;</span> <span class="identifier">has_plus_t</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"has_plus_t incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span><span class="special">(</span> <span class="special">!</span><span class="identifier">has_plus_and_minus</span><span class="special">&lt;</span> <span class="identifier">has_minus_t</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">,</span> <span class="string">"has_minus_t incorrectly detected as having plus and minus"</span>
+ <span class="special">);</span>
+
+<span class="keyword">static_assert</span>
+<span class="special">(</span> <span class="identifier">has_plus_and_minus</span><span class="special">&lt;</span> <span class="identifier">has_plus_and_minus_t</span> <span class="special">&gt;::</span><span class="identifier">value</span>
+<span class="special">,</span> <span class="string">"has_plus_and_minus_t incorrectly detected as not having plus and minus"</span>
+<span class="special">);</span>
+</pre>
+</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 &#169; 2012 Matt Calabrese<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="function_template_macros.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/enable_if/libs/enable_if/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/enable_if/libs/enable_if/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/html/index.html 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,112 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;Enable_If Macros</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Enable_If Macros">
+<link rel="next" href="enable_if_macros/function_template_macros.html" title="Function Template Macros">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="spirit-nav"><a accesskey="n" href="enable_if_macros/function_template_macros.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="enable_if_macros"></a>Chapter&#160;1.&#160;Enable_If Macros</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Matt</span> <span class="surname">Calabrese</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 2012 Matt Calabrese</p></div>
+<div><div class="legalnotice">
+<a name="enable_if_macros.legal"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Preface</span></dt>
+<dt><span class="section"><a href="enable_if_macros/function_template_macros.html">Function Template
+ Macros</a></span></dt>
+<dd><dl>
+<dt><span class="section">BOOST_ENABLE_IF</span></dt>
+<dt><span class="section">BOOST_LAZY_ENABLE_IF</span></dt>
+<dt><span class="section">BOOST_ENABLE_IF_EXPR</span></dt>
+<dt><span class="section">BOOST_LAZY_ENABLE_IF_EXPR</span></dt>
+</dl></dd>
+<dt><span class="section">Type Template Macros</span></dt>
+<dd><dl>
+<dt><span class="section">BOOST_TYPE_ENABLE_IF</span></dt>
+<dt><span class="section">BOOST_TYPE_ENABLE_IF_EXPR</span></dt>
+</dl></dd>
+</dl>
+</div>
+<div class="section enable_if_macros_preface">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="enable_if_macros.preface"></a><a class="link" href="index.html#enable_if_macros.preface" title="Preface">Preface</a>
+</h2></div></div></div>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="bold"><strong><span class="emphasis"><em><span class="quote">&#8220;<span class="quote">You managed to cram so many non-C++03
+ things in that macro it's impressive... I think that for those reasons, it's
+ pretty much unusable in real code.</span>&#8221;</span></em></span></strong></span>
+ </p></blockquote></div>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ --Mathias Gaunard, Boost Developers Mailing List
+ </p></blockquote></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This library is not officially a part of Boost. In order to use it, you
+ <span class="emphasis"><em>must</em></span> have the latest <code class="literal">Boost.Preprocessor</code>
+ implementation from trunk and you must also have the <code class="literal">variadic_macro_data
+ library</code> from the Boost Sandbox.
+ </p></td></tr>
+</table></div>
+<h4>
+<a name="enable_if_macros.preface.h0"></a>
+ <span class="phrase"><a name="enable_if_macros.preface.description"></a></span><a class="link" href="index.html#enable_if_macros.preface.description">Description</a>
+ </h4>
+<p>
+ The <code class="literal">Enable_If Macros</code> library is a collection of preprocessor
+ macros aimed toward enabling and disabling function templates and type template
+ specialization in C++11 through the use of SFINAE. Advantages over <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span></code>
+ and Boost.Enable_If
+ are explained throughout the documentation.
+ </p>
+<h4>
+<a name="enable_if_macros.preface.h1"></a>
+ <span class="phrase"><a name="enable_if_macros.preface.advantages_in_brief"></a></span><a class="link" href="index.html#enable_if_macros.preface.advantages_in_brief">Advantages
+ in Brief</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ Direct support for expression validation.
+ </li>
+<li class="listitem">
+ [Easily] usable in a function template argument list (I.E. for conversion
+ operators).
+ </li>
+<li class="listitem">
+ Work in the expected manner when a provided conditions doesn't depend on
+ a template argument.
+ </li>
+<li class="listitem">
+ Has improved "lazy" forms that allow for the introduction of
+ multiple, named lazy types.
+ </li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: October 04, 2012 at 23:00:05 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="enable_if_macros/function_template_macros.html"><img src="images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/enable_if/libs/enable_if/doc/html/standalone_HTML.manifest
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/html/standalone_HTML.manifest 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,3 @@
+index.html
+enable_if_macros/function_template_macros.html
+enable_if_macros/type_template_macros.html

Added: sandbox/enable_if/libs/enable_if/doc/preface.qbk
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/preface.qbk 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,35 @@
+[/==============================================================================
+ Copyright (C) 2011-2012 Matt Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================/]
+
+[section Preface]
+
+[:[*['["You managed to cram so many non-C++03 things in that macro it's
+impressive... I think that for those reasons, it's pretty much unusable in real
+code.]]]]
+[:--Mathias Gaunard, Boost Developers Mailing List]
+
+[note This library is not officially a part of Boost. In order to use it, you
+/must/ have the latest =Boost.Preprocessor= implementation from trunk and you
+must also have the =variadic_macro_data library= from the Boost Sandbox.]
+
+[heading Description]
+
+The =Enable_If Macros= library is a collection of preprocessor macros aimed
+toward enabling and disabling function templates and type template
+specialization in C++11 through the use of SFINAE. Advantages over
+`std::enable_if` and [boost_enable_if] are explained throughout the
+documentation.
+
+[heading Advantages in Brief]
+
+* Direct support for expression validation.
+* [Easily] usable in a function template argument list (I.E. for conversion operators).
+* Work in the expected manner when a provided conditions doesn't depend on a template argument.
+* Has improved "lazy" forms that allow for the introduction of multiple, named lazy types.
+
+[endsect]

Added: sandbox/enable_if/libs/enable_if/doc/type_template_macros.qbk
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/doc/type_template_macros.qbk 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,68 @@
+[/==============================================================================
+ Copyright (C) 2011-2012 Matt Calabrese
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================/]
+
+[section Type Template Macros]
+
+[section BOOST_TYPE_ENABLE_IF]
+
+[heading Synopsis]
+
+ #define BOOST_TYPE_ENABLE_IF_C( ... ) /* unspecified */
+ #define BOOST_TYPE_ENABLE_IF( ... ) /* unspecified */
+
+ #define BOOST_TYPE_DISABLE_IF_C( ... ) /* unspecified */
+ #define BOOST_TYPE_DISABLE_IF( ... ) /* unspecified */
+
+[heading Usage]
+
+The `BOOST_TYPE_ENABLE_IF` family of macros are function-style macros that are
+intended to be used inside of a type template specialization pattern list as a
+means to enable or disable that template based on a compile-time condition. When
+using `BOOST_TYPE_ENABLE_IF`, the condition must be a compliant
+[mpl_integral_constant] and when using `BOOST_TYPE_ENABLE_IF_C` the condition
+must be a compile-time boolean constant expression. `BOOST_TYPE_DISABLE_IF_C`
+and `BOOST_TYPE_DISABLE_IF` behave similarly only they disable the template
+specialization when the condition evaluates to `true`.
+
+[heading Example]
+
+[import ../test/type_enable_if.cpp]
+
+[type_enable_if_example]
+
+[endsect]
+
+[section BOOST_TYPE_ENABLE_IF_EXPR]
+
+[heading Synopsis]
+
+ #define BOOST_TYPE_ENABLE_IF_EXPR( ... ) /* unspecified */
+
+The `BOOST_TYPE_ENABLE_IF_EXPR` macro is a function-style macro that is
+intended to be used inside of a type template specialization pattern list as a
+means to enable or disable that specialization based on the validity of an
+expression. When using `BOOST_TYPE_ENABLE_IF_EXPR` you may pass one or more
+expressions. If you pass a single expression, it may be passed as-is. If you
+pass multiple expressions, they need to be represented as a variadic
+preprocessor sequence (each expression must be specified in their own set of
+parentheses with no comma in between them).
+
+[warning If you wish to pass in a single expression that starts with a
+parenthesized subexpression, you need to wrap that entire expression in
+parentheses, otherwise the macro will detect the argument as a variadic sequence
+and treat it as multiple expressions.]
+
+[heading Example]
+
+[import ../test/type_enable_if_expr_seq.cpp]
+
+[type_enable_if_expr_example]
+
+[endsect]
+
+[endsect]

Modified: sandbox/enable_if/libs/enable_if/test/Jamfile
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/Jamfile (original)
+++ sandbox/enable_if/libs/enable_if/test/Jamfile 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -18,6 +18,7 @@
 {
     test-suite enable_if_macros :
 
+ [ compile constructor_example.cpp : : : : ]
     [ compile disable_if.cpp : : : : ]
     [ compile disable_if_c.cpp : : : : ]
     [ compile enable_if.cpp : : : : ]

Added: sandbox/enable_if/libs/enable_if/test/constructor_example.cpp
==============================================================================
--- (empty file)
+++ sandbox/enable_if/libs/enable_if/test/constructor_example.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -0,0 +1,20 @@
+/*==============================================================================
+ Copyright (c) 2012 Matt Calabrese
+
+ Use modification and distribution are subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+//[enable_if_constructor_example
+#include <boost/utility/enable_if_macros.hpp>
+
+struct constructable_with_3_arguments
+{
+ template< class... T, BOOST_ENABLE_IF_C( sizeof...( T ) == 3 ) >
+ constructable_with_3_arguments( T&&... );
+};
+
+constructable_with_3_arguments this_will_compile( 1, 2.0, '3' );
+//constructable_with_3_arguments this_would_not_compile( 1, 2.0, '3', 4.f );
+//]

Modified: sandbox/enable_if/libs/enable_if/test/enable_if.cpp
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/enable_if.cpp (original)
+++ sandbox/enable_if/libs/enable_if/test/enable_if.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -6,6 +6,7 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
+//[enable_if_example
 #include <boost/utility/enable_if_macros.hpp>
 
 #include <boost/mpl/bool.hpp>
@@ -15,8 +16,7 @@
 boost::mpl::false_ is_arithmetic( ... );
 
 template< class T
- , BOOST_ENABLE_IF
- ( boost::is_arithmetic< T > )
+ , BOOST_ENABLE_IF( boost::is_arithmetic< T > )
>
 boost::mpl::true_ is_arithmetic( T );
 
@@ -33,3 +33,4 @@
 static_assert( !decltype( is_arithmetic( not_arithmetic_t() ) )::value
              , "not_arithmetic_t incorrectly detected as begin arithmetic."
              );
+//]

Modified: sandbox/enable_if/libs/enable_if/test/enable_if_expr_seq.cpp
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/enable_if_expr_seq.cpp (original)
+++ sandbox/enable_if/libs/enable_if/test/enable_if_expr_seq.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -6,6 +6,7 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
+//[enable_if_expr_example
 #include <boost/utility/enable_if_macros.hpp>
 
 #include <boost/mpl/bool.hpp>
@@ -50,3 +51,4 @@
 ( decltype( has_plus_and_minus( has_plus_and_minus_t() ) )::value
 , "has_plus_and_minus_t incorrectly detected as not having plus and minus"
 );
+//]

Modified: sandbox/enable_if/libs/enable_if/test/lazy_enable_if.cpp
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/lazy_enable_if.cpp (original)
+++ sandbox/enable_if/libs/enable_if/test/lazy_enable_if.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -6,6 +6,7 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
+//[lazy_enable_if_example
 #include <boost/utility/enable_if_macros.hpp>
 
 #include <boost/mpl/bool.hpp>
@@ -47,3 +48,4 @@
 static_assert( !decltype( is_arithmetic( not_arithmetic_t() ) )::value
              , "not_arithmetic_t incorrectly detected as begin arithmetic."
              );
+//]

Modified: sandbox/enable_if/libs/enable_if/test/lazy_enable_if_expr_seq.cpp
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/lazy_enable_if_expr_seq.cpp (original)
+++ sandbox/enable_if/libs/enable_if/test/lazy_enable_if_expr_seq.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -6,12 +6,12 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
+//[lazy_enable_if_expr_example
 #include <boost/utility/enable_if_macros.hpp>
 
 #include <boost/mpl/bool.hpp>
 #include <utility>
 
-
 template< class T >
 struct error_if_not_has_plus_and_minus
   : boost::mpl::true_
@@ -64,3 +64,4 @@
 ( decltype( has_plus_and_minus( has_plus_and_minus_t() ) )::value
 , "has_plus_and_minus_t incorrectly detected as not having plus and minus"
 );
+//]

Modified: sandbox/enable_if/libs/enable_if/test/type_enable_if.cpp
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/type_enable_if.cpp (original)
+++ sandbox/enable_if/libs/enable_if/test/type_enable_if.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -6,6 +6,7 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
+//[type_enable_if_example
 #include <boost/utility/enable_if_macros.hpp>
 
 #include <boost/mpl/bool.hpp>
@@ -33,3 +34,4 @@
 static_assert( !is_arithmetic< not_arithmetic_t >::value
              , "not_arithmetic_t incorrectly detected as begin arithmetic."
              );
+//]

Modified: sandbox/enable_if/libs/enable_if/test/type_enable_if_expr_seq.cpp
==============================================================================
--- sandbox/enable_if/libs/enable_if/test/type_enable_if_expr_seq.cpp (original)
+++ sandbox/enable_if/libs/enable_if/test/type_enable_if_expr_seq.cpp 2012-10-04 23:51:06 EDT (Thu, 04 Oct 2012)
@@ -6,6 +6,7 @@
     http://www.boost.org/LICENSE_1_0.txt).
 ==============================================================================*/
 
+//[type_enable_if_expr_example
 #include <boost/utility/enable_if_macros.hpp>
 
 #include <boost/mpl/bool.hpp>
@@ -56,3 +57,4 @@
 ( has_plus_and_minus< has_plus_and_minus_t >::value
 , "has_plus_and_minus_t incorrectly detected as not having plus and minus"
 );
+//]


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