|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65935 - in sandbox/chrono/libs/chrono: src test test/clock/system test/duration/special test/time_point/special test/traits/duration_values
From: vicente.botet_at_[hidden]
Date: 2010-10-12 19:32:09
Author: viboes
Date: 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
New Revision: 65935
URL: http://svn.boost.org/trac/boost/changeset/65935
Log:
Chrono: Make configurable header-only library
Text files modified:
sandbox/chrono/libs/chrono/src/chrono.cpp | 4 ++++
sandbox/chrono/libs/chrono/src/process_clock.cpp | 5 +++++
sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp | 6 ++++++
sandbox/chrono/libs/chrono/src/thread_clock.cpp | 6 ++++++
sandbox/chrono/libs/chrono/test/Jamfile.v2 | 21 +++++++++++----------
sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp | 2 +-
sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp | 4 ++--
sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp | 4 ++--
sandbox/chrono/libs/chrono/test/test_special_values.cpp | 8 ++++----
sandbox/chrono/libs/chrono/test/time_point/special/max.pass.cpp | 2 +-
sandbox/chrono/libs/chrono/test/time_point/special/min.pass.cpp | 2 +-
sandbox/chrono/libs/chrono/test/traits/duration_values/max.pass.cpp | 12 ++++++------
sandbox/chrono/libs/chrono/test/traits/duration_values/min.pass.cpp | 12 ++++++------
13 files changed, 55 insertions(+), 33 deletions(-)
Modified: sandbox/chrono/libs/chrono/src/chrono.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/chrono.cpp (original)
+++ sandbox/chrono/libs/chrono/src/chrono.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -10,6 +10,9 @@
// the library is being built (possibly exporting rather than importing code)
#define BOOST_CHRONO_SOURCE
+#include <boost/chrono/detail/inlined/chrono.hpp>
+
+#if 0
#include <boost/version.hpp>
#include <boost/chrono/chrono.hpp>
#include <boost/system/system_error.hpp>
@@ -40,3 +43,4 @@
#include "posix/chrono.cpp"
#endif // POSIX
+#endif
\ No newline at end of file
Modified: sandbox/chrono/libs/chrono/src/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/process_clock.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -14,6 +14,10 @@
// the library is being built (possibly exporting rather than importing code)
#define BOOST_CHRONO_SOURCE
+#include <boost/chrono/detail/inlined/process_clock.hpp>
+
+#if 0
+
#include <boost/chrono/config.hpp>
#include <boost/version.hpp>
#include <boost/chrono/process_times.hpp>
@@ -51,3 +55,4 @@
}}
+#endif
\ No newline at end of file
Modified: sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp (original)
+++ sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -13,6 +13,11 @@
// the library is being built (possibly exporting rather than importing code)
#define BOOST_CHRONO_SOURCE
+#include <boost/chrono/detail/inlined/process_cpu_clocks.hpp>
+
+#if 0
+
+
#include <boost/chrono/config.hpp>
#include <boost/version.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
@@ -50,3 +55,4 @@
} // namespace boost
+#endif
\ No newline at end of file
Modified: sandbox/chrono/libs/chrono/src/thread_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/thread_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/thread_clock.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -14,6 +14,11 @@
// the library is being built (possibly exporting rather than importing code)
#define BOOST_CHRONO_SOURCE
+#include <boost/chrono/detail/inlined/thread_clock.hpp>
+
+#if 0
+
+
#include <boost/chrono/config.hpp>
#include <boost/version.hpp>
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
@@ -44,3 +49,4 @@
#endif
+#endif
Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -20,7 +20,8 @@
: requirements
<os>LINUX:<threading>multi
#<library>/boost/chrono//boost_chrono
- <library>../build//boost_chrono
+ <define>BOOST_CHRONO_INLINED
+ #<library>../build//boost_chrono
<library>/boost/system//boost_system
#<library>/boost/thread//boost_thread/<link>shared
# uncomment the line above if you build outside the Boost release
@@ -85,15 +86,15 @@
[ run ../example/timeval_demo.cpp : : : : timeval_demo_dll ]
;
- test-suite "timer"
- :
- [ run ../example/run_timer_example.cpp : : : <link>static ]
- [ run ../example/run_timer_example.cpp : : : : run_timer_example_dll ]
- [ run ../example/run_timer_example2.cpp : : : <link>static ]
- [ run ../example/run_timer_example2.cpp : : : : run_timer_example2_dll ]
- [ run run_timer_test.cpp : : : <link>static ]
- [ run run_timer_test.cpp : : : : run_timer_test_dll ]
- ;
+ #test-suite "timer"
+ # :
+ # [ run ../example/run_timer_example.cpp : : : <link>static ]
+ # [ run ../example/run_timer_example.cpp : : : : run_timer_example_dll ]
+ # [ run ../example/run_timer_example2.cpp : : : <link>static ]
+ # [ run ../example/run_timer_example2.cpp : : : : run_timer_example2_dll ]
+ # [ run run_timer_test.cpp : : : <link>static ]
+ # [ run run_timer_test.cpp : : : : run_timer_test_dll ]
+ # ;
test-suite "other_clocks"
:
Modified: sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -23,7 +23,7 @@
int main()
{
- assert(boost::chrono::system_clock::duration::min() <
+ assert((boost::chrono::system_clock::duration::min)() <
boost::chrono::system_clock::duration::zero());
return 0;
}
Modified: sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/special/max.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -11,8 +11,8 @@
void test()
{
typedef typename D::rep Rep;
- Rep max_rep = boost::chrono::duration_values<Rep>::max();
- BOOST_TEST(D::max().count() == max_rep);
+ Rep max_rep = (boost::chrono::duration_values<Rep>::max)();
+ BOOST_TEST((D::max)().count() == max_rep);
}
int main()
Modified: sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/special/min.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -11,8 +11,8 @@
void test()
{
typedef typename D::rep Rep;
- Rep min_rep = boost::chrono::duration_values<Rep>::min();
- BOOST_TEST(D::min().count() == min_rep);
+ Rep min_rep = (boost::chrono::duration_values<Rep>::min)();
+ BOOST_TEST((D::min)().count() == min_rep);
}
int main()
Modified: sandbox/chrono/libs/chrono/test/test_special_values.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_special_values.cpp (original)
+++ sandbox/chrono/libs/chrono/test/test_special_values.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -35,12 +35,12 @@
void test_special_values()
{
- std::cout << "duration<unsigned>::min().count() = " << (duration<unsigned>::min()).count() << '\n';
+ std::cout << "duration<unsigned>::min().count() = " << ((duration<unsigned>::min)()).count() << '\n';
std::cout << "duration<unsigned>::zero().count() = " << duration<unsigned>::zero().count() << '\n';
- std::cout << "duration<unsigned>::max().count() = " << (duration<unsigned>::max()).count() << '\n';
- std::cout << "duration<int>::min().count() = " << (duration<int>::min()).count() << '\n';
+ std::cout << "duration<unsigned>::max().count() = " << ((duration<unsigned>::max)()).count() << '\n';
+ std::cout << "duration<int>::min().count() = " << ((duration<int>::min)()).count() << '\n';
std::cout << "duration<int>::zero().count() = " << duration<int>::zero().count() << '\n';
- std::cout << "duration<int>::max().count() = " << (duration<int>::max()).count() << '\n';
+ std::cout << "duration<int>::max().count() = " << ((duration<int>::max)()).count() << '\n';
}
int main()
Modified: sandbox/chrono/libs/chrono/test/time_point/special/max.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/time_point/special/max.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/time_point/special/max.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -10,7 +10,7 @@
typedef boost::chrono::system_clock Clock;
typedef boost::chrono::milliseconds Duration;
typedef boost::chrono::time_point<Clock, Duration> TP;
- BOOST_TEST(TP::max() == TP(Duration::max()));
+ BOOST_TEST((TP::max)() == TP((Duration::max)()));
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/time_point/special/min.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/time_point/special/min.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/time_point/special/min.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -10,7 +10,7 @@
typedef boost::chrono::system_clock Clock;
typedef boost::chrono::milliseconds Duration;
typedef boost::chrono::time_point<Clock, Duration> TP;
- BOOST_TEST(TP::min() == TP(Duration::min()));
+ BOOST_TEST((TP::min)() == TP((Duration::min)()));
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/traits/duration_values/max.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/traits/duration_values/max.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/traits/duration_values/max.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -11,12 +11,12 @@
int main()
{
- BOOST_TEST(boost::chrono::duration_values<int>::max() ==
- std::numeric_limits<int>::max());
- BOOST_TEST(boost::chrono::duration_values<double>::max() ==
- std::numeric_limits<double>::max());
- BOOST_TEST(boost::chrono::duration_values<Rep>::max() ==
- std::numeric_limits<Rep>::max());
+ BOOST_TEST((boost::chrono::duration_values<int>::max)() ==
+ (std::numeric_limits<int>::max)());
+ BOOST_TEST((boost::chrono::duration_values<double>::max)() ==
+ (std::numeric_limits<double>::max)());
+ BOOST_TEST((boost::chrono::duration_values<Rep>::max)() ==
+ (std::numeric_limits<Rep>::max)());
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/traits/duration_values/min.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/traits/duration_values/min.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/traits/duration_values/min.pass.cpp 2010-10-12 19:32:07 EDT (Tue, 12 Oct 2010)
@@ -11,12 +11,12 @@
int main()
{
- BOOST_TEST(boost::chrono::duration_values<int>::min() ==
- std::numeric_limits<int>::min());
- BOOST_TEST(boost::chrono::duration_values<double>::min() ==
- -std::numeric_limits<double>::max());
- BOOST_TEST(boost::chrono::duration_values<Rep>::min() ==
- std::numeric_limits<Rep>::min());
+ BOOST_TEST((boost::chrono::duration_values<int>::min)() ==
+ (std::numeric_limits<int>::min)());
+ BOOST_TEST((boost::chrono::duration_values<double>::min)() ==
+ -(std::numeric_limits<double>::max)());
+ BOOST_TEST((boost::chrono::duration_values<Rep>::min)() ==
+ (std::numeric_limits<Rep>::min)());
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