diff options
Diffstat (limited to 'libs/logic/doc')
-rw-r--r-- | libs/logic/doc/Jamfile.v2 | 10 | ||||
-rw-r--r-- | libs/logic/doc/tribool.boostbook | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/libs/logic/doc/Jamfile.v2 b/libs/logic/doc/Jamfile.v2 index 422ea5e83..5088a46c0 100644 --- a/libs/logic/doc/Jamfile.v2 +++ b/libs/logic/doc/Jamfile.v2 @@ -1,3 +1,13 @@ +# Tribool library + +# Copyright (C) 2002-2003 Douglas Gregor + +# 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) + +# For more information, see http://www.boost.org/ + project boost-sandbox/utility/doc ; import boostbook ; import doxygen ; diff --git a/libs/logic/doc/tribool.boostbook b/libs/logic/doc/tribool.boostbook index 1fa199aa0..80da3971e 100644 --- a/libs/logic/doc/tribool.boostbook +++ b/libs/logic/doc/tribool.boostbook @@ -138,6 +138,18 @@ if (<functionname>indeterminate</functionname>(x)) { else { // report success or failure of x }</programlisting> + + <para> All the logical operators and methods of <code><classname>tribool</classname></code> are marked + as <code>constexpr</code> in C++11. It means that <code><classname>tribool</classname></code> can + be used in compile time expressions:</para> + + <programlisting>constexpr <classname>tribool</classname> x = (tribool(true) || tribool(indeterminate)); +<functionname>static_assert</functionname>(x, "Must be true!"); +</programlisting> + + <note>Some compilers may have troubles with evaluating <code>tribool::operator safe_bool()</code> at compile time.</note> + + </section> <section> |