Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75922 - branches/release/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2011-12-12 16:49:35


Author: viboes
Date: 2011-12-12 16:49:34 EST (Mon, 12 Dec 2011)
New Revision: 75922
URL: http://svn.boost.org/trac/boost/changeset/75922

Log:
Chrono: #6243 Sandia-pgi-11.9: moren than one instance of overloaded function min matches
Text files modified:
   branches/release/libs/chrono/example/min_time_point.cpp | 5 +++--
   1 files changed, 3 insertions(+), 2 deletions(-)

Modified: branches/release/libs/chrono/example/min_time_point.cpp
==============================================================================
--- branches/release/libs/chrono/example/min_time_point.cpp (original)
+++ branches/release/libs/chrono/example/min_time_point.cpp 2011-12-12 16:49:34 EST (Mon, 12 Dec 2011)
@@ -39,6 +39,7 @@
     os << d.count() << " * " << Period::num << '/' << Period::den << " seconds\n";
 }
 
+namespace my_ns {
 // Example min utility: returns the earliest time_point
 // Being able to *easily* write this function is a major feature!
 template <class Clock, class Duration1, class Duration2>
@@ -49,7 +50,7 @@
 {
     return t2 < t1 ? t2 : t1;
 }
-
+}
 void test_min()
 {
 #if 1
@@ -60,7 +61,7 @@
     typedef boost::common_type<T1, T2>::type T3;
     /*auto*/ T1 t1 = system_clock::now() + seconds(3);
     /*auto*/ T2 t2 = system_clock::now() + nanoseconds(3);
- /*auto*/ T3 t3 = (min)(t1, t2);
+ /*auto*/ T3 t3 = (my_ns::min)(t1, t2);
 #else
     BOOST_AUTO(t1, system_clock::now() + seconds(3));
     BOOST_AUTO(t2, system_clock::now() + nanoseconds(3));


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