Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78371 - in trunk/libs: local_function/test utility/identity_type/doc/html
From: lorcaminiti_at_[hidden]
Date: 2012-05-07 14:54:40


Author: lcaminiti
Date: 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
New Revision: 78371
URL: http://svn.boost.org/trac/boost/changeset/78371

Log:
Resolved all LocalFunctions to-dos. Still trying to pin-point a VACPP internal error.
Text files modified:
   trunk/libs/local_function/test/add_classifiers_seq.cpp | 3 +--
   trunk/libs/local_function/test/all_decl_seq.cpp | 3 ++-
   trunk/libs/local_function/test/return_derivative.cpp | 2 --
   trunk/libs/local_function/test/return_derivative_seq.cpp | 1 -
   trunk/libs/local_function/test/same_line.cpp | 10 ++--------
   trunk/libs/local_function/test/same_line_seq.cpp | 10 ++--------
   trunk/libs/utility/identity_type/doc/html/index.html | 2 +-
   7 files changed, 8 insertions(+), 23 deletions(-)

Modified: trunk/libs/local_function/test/add_classifiers_seq.cpp
==============================================================================
--- trunk/libs/local_function/test/add_classifiers_seq.cpp (original)
+++ trunk/libs/local_function/test/add_classifiers_seq.cpp 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -14,8 +14,7 @@
 #include <boost/detail/lightweight_test.hpp>
 
 int main(void) {
- /** @todo re-add register and document that vacpp doesn't support it */
- int BOOST_LOCAL_FUNCTION( (auto int x) (/*register*/ int y) ) {
+ int BOOST_LOCAL_FUNCTION( (auto int x) (register int y) ) {
         return x + y;
     } BOOST_LOCAL_FUNCTION_NAME(add)
 

Modified: trunk/libs/local_function/test/all_decl_seq.cpp
==============================================================================
--- trunk/libs/local_function/test/all_decl_seq.cpp (original)
+++ trunk/libs/local_function/test/all_decl_seq.cpp 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -124,10 +124,11 @@
                     (const bind p) (bind this_) ) {
             } BOOST_LOCAL_FUNCTION_NAME(pt)
             pt();*/
+/** is this the problem?
             void BOOST_LOCAL_FUNCTION( (const bind a) (const bind& b)
                     (const bind p) (bind c) (bind this_) (bind& d) (bind q) ) {
             } BOOST_LOCAL_FUNCTION_NAME(lpt)
- lpt();
+ lpt();*/
         }
 
         { // All params, const binds, and plain binds.

Modified: trunk/libs/local_function/test/return_derivative.cpp
==============================================================================
--- trunk/libs/local_function/test/return_derivative.cpp (original)
+++ trunk/libs/local_function/test/return_derivative.cpp 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -17,8 +17,6 @@
 #include <boost/detail/lightweight_test.hpp>
 
 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function, 1)
-/** @todo is this really needed? does it fix the problem with gcc-mingw-4.5.2[_0x] or not? */
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function1, 2) // Also `functionN`.
 
 boost::function<int (int)> derivative(boost::function<int (int)>& f, int dx) {
     int BOOST_LOCAL_FUNCTION(bind& f, const bind dx, int x) {

Modified: trunk/libs/local_function/test/return_derivative_seq.cpp
==============================================================================
--- trunk/libs/local_function/test/return_derivative_seq.cpp (original)
+++ trunk/libs/local_function/test/return_derivative_seq.cpp 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -12,7 +12,6 @@
 #include <boost/detail/lightweight_test.hpp>
 
 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function1, 2) // Also `functionN`.
 
 boost::function<int (int)> derivative(boost::function<int (int)>& f, int dx) {
     int BOOST_LOCAL_FUNCTION( (bind& f) (const bind dx) (int x) ) {

Modified: trunk/libs/local_function/test/same_line.cpp
==============================================================================
--- trunk/libs/local_function/test/same_line.cpp (original)
+++ trunk/libs/local_function/test/same_line.cpp 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -41,19 +41,13 @@
 template<typename T>
 void f(T& delta) {
     LOCAL_INC_DEC_TPL(delta) // Multiple local functions on same line.
- /** @todo back to BOOST_TEST(dec(inc(123)) == 123)) and doc that on vacpp compiler composition doesn't work */
- BOOST_TEST(inc(123) == 123 + delta);
- BOOST_TEST(dec(123) == 123 - delta);
+ BOOST_TEST(dec(inc(123)) == 123);
 }
 
 int main(void) {
     int delta = 10;
-
     LOCAL_INC_DEC(delta) // Multiple local functions on same line.
- /** @todo back to BOOST_TEST(dec(inc(123)) == 123)) and doc that on vacpp compiler composition doesn't work */
- BOOST_TEST(inc(123) == 123 + delta);
- BOOST_TEST(dec(123) == 123 - delta);
-
+ BOOST_TEST(dec(inc(123)) == 123);
     f(delta);
     return boost::report_errors();
 }

Modified: trunk/libs/local_function/test/same_line_seq.cpp
==============================================================================
--- trunk/libs/local_function/test/same_line_seq.cpp (original)
+++ trunk/libs/local_function/test/same_line_seq.cpp 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -35,19 +35,13 @@
 template<typename T>
 void f(T& delta) {
     LOCAL_INC_DEC_TPL(delta) // Multiple local functions on same line.
- /** @todo back to BOOST_TEST(dec(inc(123)) == 123)) and doc that on vacpp compiler composition doesn't work */
- BOOST_TEST(inc(123) == 123 + delta);
- BOOST_TEST(dec(123) == 123 - delta);
+ BOOST_TEST(dec(inc(123)) == 123);
 }
 
 int main(void) {
     int delta = 10;
-
     LOCAL_INC_DEC(delta) // Declare local functions on same line using `_ID`.
- /** @todo back to BOOST_TEST(dec(inc(123)) == 123)) and doc that on vacpp compiler composition doesn't work */
- BOOST_TEST(inc(123) == 123 + delta);
- BOOST_TEST(dec(123) == 123 - delta);
-
+ BOOST_TEST(dec(inc(123)) == 123);
     f(delta);
     return boost::report_errors();
 }

Modified: trunk/libs/utility/identity_type/doc/html/index.html
==============================================================================
--- trunk/libs/utility/identity_type/doc/html/index.html (original)
+++ trunk/libs/utility/identity_type/doc/html/index.html 2012-05-07 14:54:38 EDT (Mon, 07 May 2012)
@@ -236,7 +236,7 @@
 
 <a class="link" href="#BOOST_IDENTITY_TYPE" title="Macro BOOST_IDENTITY_TYPE">BOOST_IDENTITY_TYPE</a>(parenthesized_type)</pre><div class="refentry" title="Macro BOOST_IDENTITY_TYPE"><a name="BOOST_IDENTITY_TYPE"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">Macro BOOST_IDENTITY_TYPE</span></h2><p>BOOST_IDENTITY_TYPE — This macro allows to wrap the specified type expression within extra round parenthesis so the type can be passed as a single macro parameter even if it contains commas (not already wrapped within round parenthesis). </p></div><h2 class="refsynopsisdiv-title">Synopsis</h2><div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="#header.boost.utility.identity_type_hpp" title="Header &lt;boost/utility/identity_type.hpp&gt;">boost/utility/identity_type.hpp</a>&gt;
 
-</span>BOOST_IDENTITY_TYPE(parenthesized_type)</pre></div><div class="refsect1" title="Description"><a name="id499377"></a><h2>Description</h2><p><span class="bold"><strong>Parameters:</strong></span> </p><div class="informaltable"><table class="table"><colgroup><col><col></colgroup><tbody><tr><td><span class="bold"><strong><code class="computeroutput">parenthesized_type</code></strong></span></td><td>The type expression to be passed as macro parameter wrapped by a single set of round parenthesis <code class="computeroutput">(...)</code>. This type expression can contain an arbitrary number of commas. </td></tr></tbody></table></div><p>
+</span>BOOST_IDENTITY_TYPE(parenthesized_type)</pre></div><div class="refsect1" title="Description"><a name="id554262"></a><h2>Description</h2><p><span class="bold"><strong>Parameters:</strong></span> </p><div class="informaltable"><table class="table"><colgroup><col><col></colgroup><tbody><tr><td><span class="bold"><strong><code class="computeroutput">parenthesized_type</code></strong></span></td><td>The type expression to be passed as macro parameter wrapped by a single set of round parenthesis <code class="computeroutput">(...)</code>. This type expression can contain an arbitrary number of commas. </td></tr></tbody></table></div><p>
 </p><p>This macro works on any C++03 compiler (it does not use variadic macros).</p><p>This macro must be prefixed by <code class="computeroutput">typename</code> when used within templates. Note that the compiler will not be able to automatically determine function template parameters when they are wrapped with this macro (these parameters need to be explicitly specified when calling the function template).</p><p>On some compilers (like GCC), using this macro on abstract types requires to add and remove a reference to the specified type. </p></div></div></div></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a id="ftn.boost_utility_identitytype.solution.f0" href="#boost_utility_identitytype.solution.f0" class="para">1</a>] </sup>
         Using variadic macros, it would be possible to require a single set of extra
         parenthesis <code class="computeroutput"><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">(</span></code><code class="literal"><span class="emphasis"><em>type</em></span></code><code class="computeroutput"><span class="special">)</span></code> instead of two <code class="computeroutput"><span class="identifier">BOOST_IDENTITY_TYPE</span><span class="special">((</span></code><code class="literal"><span class="emphasis"><em>type</em></span></code><code class="computeroutput"><span class="special">))</span></code> but variadic macros are not part of C++03


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