From 4b95679ab590773ea59c5b09bc6d90760f51c6f3 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Apr 2001 11:30:46 +0000 Subject: [PATCH] added support for boost test runtime environment [SVN r9996] --- examples/copy_example.cpp | 3 ++- examples/fill_example.cpp | 3 ++- examples/iter_swap_example.cpp | 3 ++- examples/trivial_destructor_example.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/copy_example.cpp b/examples/copy_example.cpp index c20e27a..9c96930 100644 --- a/examples/copy_example.cpp +++ b/examples/copy_example.cpp @@ -27,6 +27,7 @@ #include #include +#include using std::cout; using std::endl; @@ -149,7 +150,7 @@ const char* cc_array = cc_array_; const int iter_count = 1000000; -int main() +int cpp_main(int argc, char* argv[]) { boost::timer t; double result; diff --git a/examples/fill_example.cpp b/examples/fill_example.cpp index ce5f03e..4fc0fb0 100644 --- a/examples/fill_example.cpp +++ b/examples/fill_example.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #if defined(BOOST_NO_STDC_NAMESPACE) || (defined(std) && defined(__SGI_STL_PORT)) namespace std{ using :: memset; } @@ -116,7 +117,7 @@ const char* cc_array = cc_array_; const int iter_count = 1000000; -int main() +int cpp_main(int argc, char* argv[]) { boost::timer t; double result; diff --git a/examples/iter_swap_example.cpp b/examples/iter_swap_example.cpp index b1e5e65..955e6d7 100644 --- a/examples/iter_swap_example.cpp +++ b/examples/iter_swap_example.cpp @@ -29,6 +29,7 @@ #include #include +#include using std::cout; using std::endl; @@ -89,7 +90,7 @@ inline void iter_swap(I1 one, I2 two) }; // namespace opt -int main() +int cpp_main(int argc, char* argv[]) { // // testing iter_swap diff --git a/examples/trivial_destructor_example.cpp b/examples/trivial_destructor_example.cpp index ff7d256..32f4dbf 100644 --- a/examples/trivial_destructor_example.cpp +++ b/examples/trivial_destructor_example.cpp @@ -24,6 +24,7 @@ #include #include +#include using std::cout; using std::endl; @@ -103,7 +104,7 @@ const char cc_array[array_size] = { 0,}; const int iter_count = 1000000; -int main() +int cpp_main(int argc, char* argv[]) { boost::timer t; double result;