Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74930 - in branches/release: boost boost/type_traits boost/type_traits/detail libs/type_traits libs/type_traits/doc libs/type_traits/doc/html libs/type_traits/doc/html/boost_typetraits/category/value_traits libs/type_traits/doc/html/index
From: frederic.bron_at_[hidden]
Date: 2011-10-12 15:41:12


Author: bronf
Date: 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
New Revision: 74930
URL: http://svn.boost.org/trac/boost/changeset/74930

Log:
operator traits: merged trunk->release (patch to make clang work)
Properties modified:
   branches/release/boost/type_traits/ (props changed)
   branches/release/boost/type_traits.hpp (props changed)
   branches/release/libs/type_traits/ (props changed)
Text files modified:
   branches/release/boost/type_traits/detail/has_binary_operator.hpp | 42 +++++++++++++++++-----------------
   branches/release/boost/type_traits/detail/has_postfix_operator.hpp | 48 ++++++++++++++++++++-------------------
   branches/release/boost/type_traits/detail/has_prefix_operator.hpp | 42 +++++++++++++++++-----------------
   branches/release/libs/type_traits/doc/html/boost_typetraits/category/value_traits/operators.html | 38 +++++++++++++++---------------
   branches/release/libs/type_traits/doc/html/index.html | 4 +-
   branches/release/libs/type_traits/doc/html/index/s11.html | 2
   branches/release/libs/type_traits/doc/html/index/s12.html | 2
   branches/release/libs/type_traits/doc/html/index/s13.html | 2
   branches/release/libs/type_traits/doc/html/index/s14.html | 2
   branches/release/libs/type_traits/doc/operators.qbk | 38 +++++++++++++++---------------
   10 files changed, 111 insertions(+), 109 deletions(-)

Modified: branches/release/boost/type_traits/detail/has_binary_operator.hpp
==============================================================================
--- branches/release/boost/type_traits/detail/has_binary_operator.hpp (original)
+++ branches/release/boost/type_traits/detail/has_binary_operator.hpp 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -38,7 +38,7 @@
 // cannot find another implementation -> declared as system header to suppress these warnings.
 #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
 # pragma GCC system_header
-#elif BOOST_MSVC
+#elif defined(BOOST_MSVC)
 # pragma warning ( push )
 # pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 )
 #endif
@@ -54,7 +54,23 @@
 template <typename T> T &make();
 
 
-// 2. checks if the operator returns void or not
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&);
+
+
+// 3. checks if the operator returns void or not
 // conditions: Lhs!=void and Rhs!=void
 
 // we first redefine "operator," so that we have no compilation error if
@@ -80,7 +96,7 @@
 };
 
 
-// 3. checks if the return type is Ret or Ret==dont_care
+// 4. checks if the return type is Ret or Ret==dont_care
 // conditions: Lhs!=void and Rhs!=void
 
 struct dont_care { };
@@ -125,22 +141,6 @@
 };
 
 
-// 4. we provide our operator definition for types that do not have one already
-
-// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
-// found in the type's own namespace (our own operator is used) so that we have
-// a means to know that our operator was used
-struct no_operator { };
-
-// this class allows implicit conversions and makes the following operator
-// definition less-preferred than any other such operators that might be found
-// via argument-dependent name lookup
-struct any { template <class T> any(T const&); };
-
-// when operator BOOST_TT_TRAIT_OP is not available, this one is used
-no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&);
-
-
 // 5. checks for operator existence
 // condition: Lhs!=void and Rhs!=void
 
@@ -159,7 +159,7 @@
 };
 
 
-// 5. main trait: to avoid any compilation error, this class behaves
+// 6. main trait: to avoid any compilation error, this class behaves
 // differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the
 // standard.
 // Forbidden_if is a bool that is:
@@ -222,7 +222,7 @@
 
 } // namespace boost
 
-#ifdef BOOST_MSVC
+#if defined(BOOST_MSVC)
 # pragma warning ( pop )
 #endif
 

Modified: branches/release/boost/type_traits/detail/has_postfix_operator.hpp
==============================================================================
--- branches/release/boost/type_traits/detail/has_postfix_operator.hpp (original)
+++ branches/release/boost/type_traits/detail/has_postfix_operator.hpp 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -21,9 +21,12 @@
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
 
-#if defined(BOOST_MSVC)
+// avoid warnings
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+# pragma GCC system_header
+#elif defined(BOOST_MSVC)
 # pragma warning ( push )
-# pragma warning ( disable : 4913 4244 )
+# pragma warning ( disable : 4244 4913 )
 #endif
 
 namespace boost {
@@ -37,7 +40,23 @@
 template <typename T> T &make();
 
 
-// 2. checks if the operator returns void or not
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&, int);
+
+
+// 3. checks if the operator returns void or not
 // conditions: Lhs!=void
 
 // we first redefine "operator," so that we have no compilation error if
@@ -60,11 +79,10 @@
    static ::boost::type_traits::yes_type returns_void(returns_void_t);
    static ::boost::type_traits::no_type returns_void(int);
    BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP,returns_void_t())))));
- //BOOST_STATIC_CONSTANT(bool, value = (::boost::is_same< bool volatile, Lhs >::value));
 };
 
 
-// 3. checks if the return type is Ret or Ret==dont_care
+// 4. checks if the return type is Ret or Ret==dont_care
 // conditions: Lhs!=void
 
 struct dont_care { };
@@ -109,22 +127,6 @@
 };
 
 
-// 4. we provide our operator definition for types that do not have one already
-
-// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
-// found in the type's own namespace (our own operator is used) so that we have
-// a means to know that our operator was used
-struct no_operator { };
-
-// this class allows implicit conversions and makes the following operator
-// definition less-preferred than any other such operators that might be found
-// via argument-dependent name lookup
-struct any { template <class T> any(T const&); };
-
-// when operator BOOST_TT_TRAIT_OP is not available, this one is used
-no_operator operator BOOST_TT_TRAIT_OP (const any&, int);
-
-
 // 5. checks for operator existence
 // condition: Lhs!=void
 
@@ -143,7 +145,7 @@
 };
 
 
-// 5. main trait: to avoid any compilation error, this class behaves
+// 6. main trait: to avoid any compilation error, this class behaves
 // differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the
 // standard.
 // Forbidden_if is a bool that is:
@@ -194,7 +196,7 @@
 } // namespace boost
 
 #if defined(BOOST_MSVC)
-# pragma warning (pop)
+# pragma warning ( pop )
 #endif
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>

Modified: branches/release/boost/type_traits/detail/has_prefix_operator.hpp
==============================================================================
--- branches/release/boost/type_traits/detail/has_prefix_operator.hpp (original)
+++ branches/release/boost/type_traits/detail/has_prefix_operator.hpp 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -32,7 +32,7 @@
 // cannot find another implementation -> declared as system header to suppress these warnings.
 #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
 # pragma GCC system_header
-#elif BOOST_MSVC
+#elif defined(BOOST_MSVC)
 # pragma warning ( push )
 # pragma warning ( disable : 4146 4804 4913 4244 )
 #endif
@@ -48,7 +48,23 @@
 template <typename T> T &make();
 
 
-// 2. checks if the operator returns void or not
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&);
+
+
+// 3. checks if the operator returns void or not
 // conditions: Rhs!=void
 
 // we first redefine "operator," so that we have no compilation error if
@@ -74,7 +90,7 @@
 };
 
 
-// 3. checks if the return type is Ret or Ret==dont_care
+// 4. checks if the return type is Ret or Ret==dont_care
 // conditions: Rhs!=void
 
 struct dont_care { };
@@ -119,22 +135,6 @@
 };
 
 
-// 4. we provide our operator definition for types that do not have one already
-
-// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
-// found in the type's own namespace (our own operator is used) so that we have
-// a means to know that our operator was used
-struct no_operator { };
-
-// this class allows implicit conversions and makes the following operator
-// definition less-preferred than any other such operators that might be found
-// via argument-dependent name lookup
-struct any { template <class T> any(T const&); };
-
-// when operator BOOST_TT_TRAIT_OP is not available, this one is used
-no_operator operator BOOST_TT_TRAIT_OP (const any&);
-
-
 // 5. checks for operator existence
 // condition: Rhs!=void
 
@@ -153,7 +153,7 @@
 };
 
 
-// 5. main trait: to avoid any compilation error, this class behaves
+// 6. main trait: to avoid any compilation error, this class behaves
 // differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the
 // standard.
 // Forbidden_if is a bool that is:
@@ -203,7 +203,7 @@
 
 } // namespace boost
 
-#ifdef BOOST_MSVC
+#if defined(BOOST_MSVC)
 # pragma warning ( pop )
 #endif
 

Modified: branches/release/libs/type_traits/doc/html/boost_typetraits/category/value_traits/operators.html
==============================================================================
--- branches/release/libs/type_traits/doc/html/boost_typetraits/category/value_traits/operators.html (original)
+++ branches/release/libs/type_traits/doc/html/boost_typetraits/category/value_traits/operators.html 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -1168,7 +1168,23 @@
 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">T</span> <span class="special">&amp;</span><span class="identifier">make</span><span class="special">();</span>
 
 
-<span class="comment">// 2. checks if the operator returns void or not</span>
+<span class="comment">// 2. we provide our operator definition for types that do not have one already</span>
+
+<span class="comment">// a type returned from operator- when no such operator is</span>
+<span class="comment">// found in the type's own namespace (our own operator is used) so that we have</span>
+<span class="comment">// a means to know that our operator was used</span>
+<span class="keyword">struct</span> <span class="identifier">no_operator</span> <span class="special">{</span> <span class="special">};</span>
+
+<span class="comment">// this class allows implicit conversions and makes the following operator</span>
+<span class="comment">// definition less-preferred than any other such operators that might be found</span>
+<span class="comment">// via argument-dependent name lookup</span>
+<span class="keyword">struct</span> <span class="identifier">any</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="identifier">any</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;);</span> <span class="special">};</span>
+
+<span class="comment">// when operator- is not available, this one is used</span>
+<span class="identifier">no_operator</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">any</span><span class="special">&amp;);</span>
+
+
+<span class="comment">// 3. checks if the operator returns void or not</span>
 <span class="comment">// conditions: Rhs!=void</span>
 
 <span class="comment">// we first redefine "operator," so that we have no compilation error if</span>
@@ -1193,7 +1209,7 @@
 <span class="special">};</span>
 
 
-<span class="comment">// 3. checks if the return type is Ret or Ret==dont_care</span>
+<span class="comment">// 4. checks if the return type is Ret or Ret==dont_care</span>
 <span class="comment">// conditions: Rhs!=void</span>
 
 <span class="keyword">struct</span> <span class="identifier">dont_care</span> <span class="special">{</span> <span class="special">};</span>
@@ -1238,22 +1254,6 @@
 <span class="special">};</span>
 
 
-<span class="comment">// 4. we provide our operator definition for types that do not have one already</span>
-
-<span class="comment">// a type returned from operator- when no such operator is</span>
-<span class="comment">// found in the type's own namespace (our own operator is used) so that we have</span>
-<span class="comment">// a means to know that our operator was used</span>
-<span class="keyword">struct</span> <span class="identifier">no_operator</span> <span class="special">{</span> <span class="special">};</span>
-
-<span class="comment">// this class allows implicit conversions and makes the following operator</span>
-<span class="comment">// definition less-preferred than any other such operators that might be found</span>
-<span class="comment">// via argument-dependent name lookup</span>
-<span class="keyword">struct</span> <span class="identifier">any</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="identifier">any</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;);</span> <span class="special">};</span>
-
-<span class="comment">// when operator- is not available, this one is used</span>
-<span class="identifier">no_operator</span> <span class="keyword">operator</span><span class="special">-(</span><span class="keyword">const</span> <span class="identifier">any</span><span class="special">&amp;);</span>
-
-
 <span class="comment">// 5. checks for operator existence</span>
 <span class="comment">// condition: Rhs!=void</span>
 
@@ -1272,7 +1272,7 @@
 <span class="special">};</span>
 
 
-<span class="comment">// 5. main trait: to avoid any compilation error, this class behaves</span>
+<span class="comment">// 6. main trait: to avoid any compilation error, this class behaves</span>
 <span class="comment">// differently when operator-(Rhs) is forbidden by the standard.</span>
 <span class="comment">// Forbidden_if is a bool that is:</span>
 <span class="comment">// - true when the operator-(Rhs) is forbidden by the standard</span>

Modified: branches/release/libs/type_traits/doc/html/index.html
==============================================================================
--- branches/release/libs/type_traits/doc/html/index.html (original)
+++ branches/release/libs/type_traits/doc/html/index.html 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -31,7 +31,7 @@
       Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
       Watanabe</p></div>
 <div><div class="legalnotice">
-<a name="id3321590"></a><p>
+<a name="id3043727"></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>
@@ -212,7 +212,7 @@
   </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: August 22, 2011 at 19:22:32 +0200</small></p></td>
+<td align="left"><p><small>Last revised: October 07, 2011 at 23:05:54 +0200</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: branches/release/libs/type_traits/doc/html/index/s11.html
==============================================================================
--- branches/release/libs/type_traits/doc/html/index/s11.html (original)
+++ branches/release/libs/type_traits/doc/html/index/s11.html 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id3465380"></a>Class Index</h2></div></div></div>
+<a name="id3187570"></a>Class Index</h2></div></div></div>
 <p><a class="link" href="s11.html#idx_id_0">A</a> <a class="link" href="s11.html#idx_id_2">C</a> <a class="link" href="s11.html#idx_id_3">D</a> <a class="link" href="s11.html#idx_id_4">E</a> <a class="link" href="s11.html#idx_id_5">F</a> <a class="link" href="s11.html#idx_id_6">H</a> <a class="link" href="s11.html#idx_id_7">I</a> <a class="link" href="s11.html#idx_id_8">M</a> <a class="link" href="s11.html#idx_id_9">N</a> <a class="link" href="s11.html#idx_id_10">O</a> <a class="link" href="s11.html#idx_id_11">P</a> <a class="link" href="s11.html#idx_id_12">R</a> <a class="link" href="s11.html#idx_id_13">T</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: branches/release/libs/type_traits/doc/html/index/s12.html
==============================================================================
--- branches/release/libs/type_traits/doc/html/index/s12.html (original)
+++ branches/release/libs/type_traits/doc/html/index/s12.html 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id3468212"></a>Typedef Index</h2></div></div></div>
+<a name="id3190401"></a>Typedef Index</h2></div></div></div>
 <p><a class="link" href="s12.html#idx_id_20">F</a> <a class="link" href="s12.html#idx_id_27">R</a> <a class="link" href="s12.html#idx_id_28">T</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: branches/release/libs/type_traits/doc/html/index/s13.html
==============================================================================
--- branches/release/libs/type_traits/doc/html/index/s13.html (original)
+++ branches/release/libs/type_traits/doc/html/index/s13.html 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id3468450"></a>Macro Index</h2></div></div></div>
+<a name="id3190640"></a>Macro Index</h2></div></div></div>
 <p><a class="link" href="s13.html#idx_id_31">B</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: branches/release/libs/type_traits/doc/html/index/s14.html
==============================================================================
--- branches/release/libs/type_traits/doc/html/index/s14.html (original)
+++ branches/release/libs/type_traits/doc/html/index/s14.html 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -23,7 +23,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id3469178"></a>Index</h2></div></div></div>
+<a name="id3191368"></a>Index</h2></div></div></div>
 <p><a class="link" href="s14.html#idx_id_45">A</a> <a class="link" href="s14.html#idx_id_46">B</a> <a class="link" href="s14.html#idx_id_47">C</a> <a class="link" href="s14.html#idx_id_48">D</a> <a class="link" href="s14.html#idx_id_49">E</a> <a class="link" href="s14.html#idx_id_50">F</a> <a class="link" href="s14.html#idx_id_51">H</a> <a class="link" href="s14.html#idx_id_52">I</a> <a class="link" href="s14.html#idx_id_53">M</a> <a class="link" href="s14.html#idx_id_54">N</a> <a class="link" href="s14.html#idx_id_55">O</a> <a class="link" href="s14.html#idx_id_56">P</a> <a class="link" href="s14.html#idx_id_57">R</a> <a class="link" href="s14.html#idx_id_58">T</a> <a class="link" href="s14.html#idx_id_59">U</a></p>
 <div class="variablelist"><dl>
 <dt>

Modified: branches/release/libs/type_traits/doc/operators.qbk
==============================================================================
--- branches/release/libs/type_traits/doc/operators.qbk (original)
+++ branches/release/libs/type_traits/doc/operators.qbk 2011-10-12 15:41:11 EDT (Wed, 12 Oct 2011)
@@ -261,7 +261,23 @@
 template <typename T> T &make();
 
 
-// 2. checks if the operator returns void or not
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator- when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator- is not available, this one is used
+no_operator operator-(const any&);
+
+
+// 3. checks if the operator returns void or not
 // conditions: Rhs!=void
 
 // we first redefine "operator," so that we have no compilation error if
@@ -286,7 +302,7 @@
 };
 
 
-// 3. checks if the return type is Ret or Ret==dont_care
+// 4. checks if the return type is Ret or Ret==dont_care
 // conditions: Rhs!=void
 
 struct dont_care { };
@@ -331,22 +347,6 @@
 };
 
 
-// 4. we provide our operator definition for types that do not have one already
-
-// a type returned from operator- when no such operator is
-// found in the type's own namespace (our own operator is used) so that we have
-// a means to know that our operator was used
-struct no_operator { };
-
-// this class allows implicit conversions and makes the following operator
-// definition less-preferred than any other such operators that might be found
-// via argument-dependent name lookup
-struct any { template <class T> any(T const&); };
-
-// when operator- is not available, this one is used
-no_operator operator-(const any&);
-
-
 // 5. checks for operator existence
 // condition: Rhs!=void
 
@@ -365,7 +365,7 @@
 };
 
 
-// 5. main trait: to avoid any compilation error, this class behaves
+// 6. main trait: to avoid any compilation error, this class behaves
 // differently when operator-(Rhs) is forbidden by the standard.
 // Forbidden_if is a bool that is:
 // - true when the operator-(Rhs) is forbidden by the standard


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