Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68667 - trunk/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2011-02-06 07:29:21


Author: viboes
Date: 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
New Revision: 68667
URL: http://svn.boost.org/trac/boost/changeset/68667

Log:
Chrono: Remove error: ambiguous reference to std ratio or chrono interface

Text files modified:
   trunk/libs/chrono/example/french.cpp | 3 ++-
   trunk/libs/chrono/example/io_ex1.cpp | 2 +-
   trunk/libs/chrono/example/io_ex2.cpp | 3 +--
   trunk/libs/chrono/example/io_ex3.cpp | 4 ++--
   trunk/libs/chrono/example/io_ex4.cpp | 2 +-
   trunk/libs/chrono/example/io_ex5.cpp | 4 ++--
   trunk/libs/chrono/example/miscellaneous.cpp | 1 -
   trunk/libs/chrono/example/test_duration.cpp | 1 -
   8 files changed, 9 insertions(+), 11 deletions(-)

Modified: trunk/libs/chrono/example/french.cpp
==============================================================================
--- trunk/libs/chrono/example/french.cpp (original)
+++ trunk/libs/chrono/example/french.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -15,7 +15,8 @@
 
 int main()
 {
- using namespace std;
+ using std::cout;
+ using std::locale;
     using namespace boost;
     using namespace boost::chrono;
 

Modified: trunk/libs/chrono/example/io_ex1.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex1.cpp (original)
+++ trunk/libs/chrono/example/io_ex1.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -18,7 +18,7 @@
 
 int main()
 {
- using namespace std;
+ using std::cout;
     using namespace boost;
     using namespace boost::chrono;
 

Modified: trunk/libs/chrono/example/io_ex2.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex2.cpp (original)
+++ trunk/libs/chrono/example/io_ex2.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -18,10 +18,9 @@
 
 int main()
 {
- using namespace std;
     using namespace boost::chrono;
 
- istringstream in("5000 milliseconds 4000 ms 3001 ms");
+ std::istringstream in("5000 milliseconds 4000 ms 3001 ms");
     seconds d(0);
     in >> d;
     BOOST_ASSERT(in.good());

Modified: trunk/libs/chrono/example/io_ex3.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex3.cpp (original)
+++ trunk/libs/chrono/example/io_ex3.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -19,11 +19,11 @@
 
 int main()
 {
- using namespace std;
     using namespace boost::chrono;
+ using std::cout;
 
     high_resolution_clock::time_point t0 = high_resolution_clock::now();
- stringstream io;
+ std::stringstream io;
     io << t0;
     BOOST_ASSERT(!io.fail());
     cout << io.str() << '\n';

Modified: trunk/libs/chrono/example/io_ex4.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex4.cpp (original)
+++ trunk/libs/chrono/example/io_ex4.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -17,7 +17,7 @@
 
 int main()
 {
- using namespace std;
+ using std::cout;
     using namespace boost;
     using namespace boost::chrono;
 

Modified: trunk/libs/chrono/example/io_ex5.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex5.cpp (original)
+++ trunk/libs/chrono/example/io_ex5.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -22,7 +22,7 @@
 display(std::basic_ostream<CharT, Traits>& os,
         boost::chrono::duration<Rep, Period> d)
 {
- using namespace std;
+ using std::cout;
     using namespace boost;
     using namespace boost::chrono;
 
@@ -71,7 +71,7 @@
 
 int main()
 {
- using namespace std;
+ using std::cout;
     using namespace boost;
     using namespace boost::chrono;
 

Modified: trunk/libs/chrono/example/miscellaneous.cpp
==============================================================================
--- trunk/libs/chrono/example/miscellaneous.cpp (original)
+++ trunk/libs/chrono/example/miscellaneous.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -104,7 +104,6 @@
     }
     d = Duration((std::numeric_limits<Rep>::max)());
     using namespace boost::chrono;
- using namespace std;
     typedef duration<double, boost::ratio_multiply<boost::ratio<24*3652425,10000>, hours::period>::type> Years;
     Years years = d;
     std::cout << "The range is +/- " << years.count() << " years.\n";

Modified: trunk/libs/chrono/example/test_duration.cpp
==============================================================================
--- trunk/libs/chrono/example/test_duration.cpp (original)
+++ trunk/libs/chrono/example/test_duration.cpp 2011-02-06 07:29:03 EST (Sun, 06 Feb 2011)
@@ -62,7 +62,6 @@
     }
     d = Duration((std::numeric_limits<Rep>::max)());
     using namespace boost::chrono;
- using namespace std;
     typedef duration<double, boost::ratio_multiply<boost::ratio<24*3652425,10000>, hours::period>::type> Years;
     Years years = d;
     std::cout << "The range is +/- " << years.count() << " years.\n";


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