From ad98ca9c3c5d7b39c1217f22064593d4ff7b1956 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 23 Nov 2013 14:14:01 +0000 Subject: [PATCH] Rebuild some of the utility documentation. [SVN r86796] --- doc/html/declval.html | 52 +++++++++++++++++++++------------------- doc/html/string_ref.html | 24 +++++++++---------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/doc/html/declval.html b/doc/html/declval.html index 7791057..305cf36 100644 --- a/doc/html/declval.html +++ b/doc/html/declval.html @@ -3,7 +3,7 @@ Declval - + @@ -31,9 +31,10 @@
-
+
-

+

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)

@@ -43,13 +44,13 @@

Table of Contents

-
+
Overview
Reference
History
-
+
@@ -66,13 +67,13 @@ in a non-using context, e.g. given the declaration

template<class T>
-T&& declval(); // not used
-
+T&& declval(); // not used +

as part of the function template declaration

template<class To, class From>
-decltype(static_cast<To>(declval<From>())) convert(From&&);
+decltype(static_cast<To>(declval<From>())) convert(From&&);
 

or as part of a class template definition @@ -80,9 +81,9 @@

template<class> class result_of;
 
 template<class Fn, class... ArgTypes>
-struct result_of<Fn(ArgTypes...)> 
+struct result_of<Fn(ArgTypes...)>
 {
-  typedef decltype(declval<Fn>()(declval<ArgTypes>()...)) type;
+  typedef decltype(declval<Fn>()(declval<ArgTypes>()...)) type;
 };
 

@@ -94,8 +95,8 @@ to

template<class T>
-typename std::add_rvalue_reference<T>::type declval(); // not used
-
+typename std::add_rvalue_reference<T>::type declval(); // not used +

which ensures that we can also use cv void as template parameter. The careful reader might have noticed that declval() already exists under the name create() as @@ -109,7 +110,7 @@ is expected to be part of the daily tool-box of the C++0x programmer.

-
+
@@ -119,10 +120,10 @@
namespace boost {
 
     template <typename T>
-    typename add_rvalue_reference<T>::type declval() noexcept; // as unevaluated operand
-
-}  // namespace boost
-
+ typename add_rvalue_reference<T>::type declval() noexcept; // as unevaluated operand + +} // namespace boost +

The library provides the function template declval to simplify the definition of expressions which occur as unevaluated operands. @@ -142,32 +143,33 @@ Example:

template <class To, class From>
-decltype(static_cast<To>(declval<From>())) convert(From&&);
+decltype(static_cast<To>(declval<From>())) convert(From&&);
 

Declares a function template convert which only participates in overloading if the type From can be explicitly converted to type To.

-
+
-

- - boost 1.50 +

+ + boost + 1.50

- New Features: + Fixes:

-
  • +
    • #6570 Adding noexcept to boost::declval.
- +

Last revised: March 25, 2012 at 18:26:23 GMT

Last revised: November 23, 2013 at 14:11:12 GMT


diff --git a/doc/html/string_ref.html b/doc/html/string_ref.html index 0b8a9d1..3352614 100644 --- a/doc/html/string_ref.html +++ b/doc/html/string_ref.html @@ -3,7 +3,7 @@ String_Ref - + @@ -37,14 +37,14 @@

Table of Contents

-
+
Overview
Examples
Reference
History
-
+
@@ -115,7 +115,7 @@ string_ref does.

-
+
@@ -130,7 +130,7 @@ return bar.substr ( 2, 3 ); } -if ( extract_part ( "ABCDEFG" ).front() == "C" ) { /* do something */ } +if ( extract_part ( "ABCDEFG" ).front() == 'C' ) { /* do something */ }

Let's figure out what happens in this (contrived) example. @@ -166,15 +166,15 @@ copied, but those are cheap operations.

-
+

The header file "string_ref.hpp" defines a template boost::basic_string_ref, and four specializations - for char - / wchar_t / char16_t - / char32_t . + / wchar_t / char16_t + / char32_t .

#include <boost/utility/string_ref.hpp> @@ -256,22 +256,22 @@ bool ends_with(basic_string_ref x) const ;

-
+

- boost + boost 1.53

-
  • +
    • Introduced
- +

Last revised: January 14, 2013 at 16:24:14 GMT

Last revised: November 23, 2013 at 14:12:56 GMT