|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68061 - trunk/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2011-01-12 12:58:47
Author: viboes
Date: 2011-01-12 12:58:45 EST (Wed, 12 Jan 2011)
New Revision: 68061
URL: http://svn.boost.org/trac/boost/changeset/68061
Log:
Boost.Chrono: try to remove warnings
Test output: daw-msvc71 - chrono - test_clock_shared / msvc-7.1
Rev 68023 / Wed, 12 Jan 2011 02:00:50 +0000
Report Time: Wed, 12 Jan 2011 15:19:47 +0000
Compile [2011-01-12 07:20:48 UTC]: fail
call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" >nul
cl /Zm800 -nologo @"C:\boost_testing_trunk\results\boost\bin.v2\libs\chrono\test\test_clock_shared.test\msvc-7.1\debug\asynch-exceptions-on\threading-multi\test_clock.obj.rsp"
test_clock.cpp
..\libs\chrono\test\..\example\test_clock.cpp(43) : error C2082: redefinition of formal parameter '__formal'
..\libs\chrono\test\..\example\test_clock.cpp(164) : see reference to function template instantiation 'void test_clock<boost::chrono::system_clock>(void)' being compiled
..\libs\chrono\test\..\example\test_clock.cpp(43) : error C2082: redefinition of formal parameter '__formal'
..\libs\chrono\test\..\example\test_clock.cpp(43) : error C2082: redefinition of formal parameter '__formal'
..\libs\chrono\test\..\example\test_clock.cpp(61) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
..\libs\chrono\test\..\example\test_clock.cpp(67) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
..\libs\chrono\test\..\example\test_clock.cpp(43) : error C2082: redefinition of formal parameter '__formal'
..\libs\chrono\test\..\example\test_clock.cpp(166) : see reference to function template instantiation 'void test_clock<boost::chrono::steady_clock>(void)' being compiled
..\libs\chrono\test\..\example\test_clock.cpp(43) : error C2082: redefinition of formal parameter '__formal'
..\libs\chrono\test\..\example\test_clock.cpp(43) : error C2082: redefinition of formal parameter '__formal'
..\libs\chrono\test\..\example\test_clock.cpp(61) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
..\libs\chrono\test\..\example\test_clock.cpp(67) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
Text files modified:
trunk/libs/chrono/example/test_clock.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Modified: trunk/libs/chrono/example/test_clock.cpp
==============================================================================
--- trunk/libs/chrono/example/test_clock.cpp (original)
+++ trunk/libs/chrono/example/test_clock.cpp 2011-01-12 12:58:45 EST (Wed, 12 Jan 2011)
@@ -53,18 +53,18 @@
{
typename Clock::time_point start = Clock::now();
typename Clock::time_point stop;
- std::size_t count=1;
+ std::size_t counter=1;
while ((stop=Clock::now()) == start) {
- ++count;
+ ++counter;
}
//typename Clock::duration elapsed = stop - start;
- std::cout << "After " << count << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
+ std::cout << "After " << counter << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
start = Clock::now();
- for (std::size_t c=count; c>0; --c) {
+ for (std::size_t c=counter; c>0; --c) {
stop=Clock::now();;
}
- std::cout << "After " << count << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
+ std::cout << "After " << counter << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\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