Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67758 - trunk/libs/ratio/example
From: vicente.botet_at_[hidden]
Date: 2011-01-07 13:29:25


Author: viboes
Date: 2011-01-07 13:29:20 EST (Fri, 07 Jan 2011)
New Revision: 67758
URL: http://svn.boost.org/trac/boost/changeset/67758

Log:
Boost.Ratio: Try to solve issue with duration_cast use before declaration.

 Test output: Sandia-pgi-10.1 - ratio - si_physics / pgi-10.1
Rev 67748 / Fri, 7 Jan 2011 07:39:28 +0000
Report Time: Fri, 7 Jan 2011 16:48:51 +0000

Compile [2011-01-07 10:20:00 UTC]: fail

    "/sierra/Sntools/extras/compilers/pgi/linux86-64/10.1/bin/pgCC" -INLINE:none -Wc,-a --brief_diagnostics --error_limit1 --compress_names --diag_suppress450 --no_using_std --zc_eh -Kieee -fpic -gopt -DBOOST_ALL_NO_LIB=1 -DBOOST_ENABLE_WARNINGS -DBOOST_MPL_NEXT_PRIOR_EXT -DBOOST_RATIO_USES_MPL_ASSERT -D__need_IOV_MAX -I".." -c -o "/scratch/boost/results/boost/bin.v2/libs/ratio/test/si_physics.test/pgi-10.1/debug/si_physics.o" "../libs/ratio/test/../example/si_physics.cpp"

"../libs/ratio/test/../example/config.hpp", line 20 (col. 3): warning: unrecognized preprocessing directive
"../libs/ratio/test/../example/config.hpp", line 22 (col. 3): warning: unrecognized preprocessing directive
"../libs/ratio/test/../example/config.hpp", line 24 (col. 3): warning: unrecognized preprocessing directive
"../libs/ratio/test/../example/duration.hpp", line 498 (col. 28): error: namespace "boost_ex::chrono" has no member "duration_cast"
Error limit reached.
1 error detected in the compilation of "../libs/ratio/test/../example/si_physics.cpp".
Compilation terminated.

TinyUrl
Text files modified:
   trunk/libs/ratio/example/duration.hpp | 13 ++++++++-----
   1 files changed, 8 insertions(+), 5 deletions(-)

Modified: trunk/libs/ratio/example/duration.hpp
==============================================================================
--- trunk/libs/ratio/example/duration.hpp (original)
+++ trunk/libs/ratio/example/duration.hpp 2011-01-07 13:29:20 EST (Fri, 07 Jan 2011)
@@ -487,16 +487,17 @@
>
>
>::type* = 0)
-#ifdef __GNUC__
+//~ #ifdef __GNUC__
             // GCC 4.2.4 refused to accept a definition at this point,
             // yet both VC++ 9.0 SP1 and Intel ia32 11.0 accepted the definition
             // without complaint. VC++ 9.0 SP1 refused to accept a later definition,
             // although that was fine with GCC 4.2.4 and Intel ia32 11.0. Thus we
             // have to support both approaches.
- ;
-#else
- : rep_(chrono::duration_cast<duration>(d).count()) {}
-#endif
+ //~ ;
+//~ #else
+ //~ : rep_(chrono::duration_cast<duration>(d).count()) {}
+ : rep_(chrono::detail::duration_cast<duration<Rep2, Period2>, duration>()(d).count()) {}
+//~ #endif
 
         // observer
 
@@ -771,6 +772,7 @@
 // See comment in the class duration synopsis //
 //----------------------------------------------------------------------------//
 
+#if 0
 #ifdef __GNUC__
     // see comment above in section 20.9.3 Class template duration [time.duration]
     template <class Rep, class Period>
@@ -787,6 +789,7 @@
>::type*)
           : rep_(duration_cast<duration>(d).count()) {}
 #endif
+#endif
 
 }
 }


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