Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77866 - trunk/libs/local_function/test
From: lorcaminiti_at_[hidden]
Date: 2012-04-09 18:17:37


Author: lcaminiti
Date: 2012-04-09 18:17:36 EDT (Mon, 09 Apr 2012)
New Revision: 77866
URL: http://svn.boost.org/trac/boost/changeset/77866

Log:
Trying to workaround some compiler issues with LocalFunction.
Text files modified:
   trunk/libs/local_function/test/add_classifiers_seq.cpp | 3 ++-
   trunk/libs/local_function/test/return_derivative.cpp | 1 +
   trunk/libs/local_function/test/same_line.cpp | 4 +++-
   trunk/libs/local_function/test/same_line_seq.cpp | 3 ++-
   4 files changed, 8 insertions(+), 3 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-04-09 18:17:36 EDT (Mon, 09 Apr 2012)
@@ -14,7 +14,8 @@
 #include <boost/detail/lightweight_test.hpp>
 
 int main(void) {
- int BOOST_LOCAL_FUNCTION( (auto int x) (register int y) ) {
+ /** @todo re-add register and document that vacpp doesn't support it */
+ int BOOST_LOCAL_FUNCTION( (auto int x) (/*register*/ int y) ) {
         return x + y;
     } BOOST_LOCAL_FUNCTION_NAME(add)
 

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-04-09 18:17:36 EDT (Mon, 09 Apr 2012)
@@ -17,6 +17,7 @@
 #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) {

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-04-09 18:17:36 EDT (Mon, 09 Apr 2012)
@@ -33,7 +33,9 @@
     int delta = 10;
     LOCAL_INC_DEC(delta) // Multiple local functions on same line.
     
- BOOST_TEST(dec(inc(123)) == 123);
+ /** @todo back to BOOST_TEST(dec(inc(123)) == 123)) and doc that on vacpp compiler composition doesn't work */
+ BOOST_TEST(inc(123) == 123 + 10);
+ BOOST_TEST(dec(123) == 123 - 10);
     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-04-09 18:17:36 EDT (Mon, 09 Apr 2012)
@@ -27,7 +27,8 @@
     int delta = 10;
     LOCAL_INC_DEC(delta) // Declare local functions on same line using `_ID`.
     
- BOOST_TEST(dec(inc(123)) == 123);
+ BOOST_TEST(inc(123) == 123 + 10);
+ BOOST_TEST(dec(123) == 123 - 10);
     return boost::report_errors();
 }
 


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