From 426da14870ac15d2eb7a7fa806e31d5fdd89b6dd Mon Sep 17 00:00:00 2001 From: Bryce Adelstein-Lelbach Date: Fri, 14 Jan 2011 02:35:58 +0000 Subject: [PATCH] Replacing the use of with across Boost. On Linux, GNU's libstdc++, which is the default stdlib for icc and clang, cannot parse the header in version 4.5+ (which thankfully neither compiler advises the use of yet), as it's original C++98-friendly implementation has been replaced with a gnu++0x implementation. is a portable implementation of , providing boost::detail::setfill, boost::detail::setbase, boost::detail::setw, boost::detail::setprecision, boost::detail::setiosflags and boost::detail::resetiosflags. [SVN r68140] --- example/BitMachine/BitMachine.cpp | 4 ++-- example/Handcrafted/Handcrafted.cpp | 2 +- example/Keyboard/Keyboard.cpp | 6 +++--- example/Performance/Performance.cpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/BitMachine/BitMachine.cpp b/example/BitMachine/BitMachine.cpp index 89478a5..3ef831f 100644 --- a/example/BitMachine/BitMachine.cpp +++ b/example/BitMachine/BitMachine.cpp @@ -67,7 +67,7 @@ #include #include -#include +#include #include // size_t #ifdef BOOST_INTEL @@ -126,7 +126,7 @@ void DisplayBits( unsigned int number ) buffer[ bit ] = number & ( 1 << ( NO_OF_BITS - bit - 1 ) ) ? '1' : '0'; } - std::cout << "Current state: " << std::setw( 4 ) << + std::cout << "Current state: " << boost::detail::setw( 4 ) << number << " (" << buffer << ")" << std::endl; } diff --git a/example/Handcrafted/Handcrafted.cpp b/example/Handcrafted/Handcrafted.cpp index 7b77c26..a0858ec 100644 --- a/example/Handcrafted/Handcrafted.cpp +++ b/example/Handcrafted/Handcrafted.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #ifdef BOOST_NO_STDC_NAMESPACE diff --git a/example/Keyboard/Keyboard.cpp b/example/Keyboard/Keyboard.cpp index e9f0867..d990c9d 100644 --- a/example/Keyboard/Keyboard.cpp +++ b/example/Keyboard/Keyboard.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #ifdef BOOST_INTEL # pragma warning( disable: 304 ) // access control not specified @@ -125,9 +125,9 @@ void DisplayStateConfiguration( const Keyboard & keyboard ) } #ifdef BOOST_STATECHART_USE_NATIVE_RTTI - std::cout << std::setw( 15 ) << typeid( *pState ).name(); + std::cout << boost::detail::setw( 15 ) << typeid( *pState ).name(); #else - std::cout << std::setw( 15 ) << + std::cout << boost::detail::setw( 15 ) << pState->custom_dynamic_type_ptr< char >(); #endif pState = pState->outer_state_ptr(); diff --git a/example/Performance/Performance.cpp b/example/Performance/Performance.cpp index 7b127ce..3cd9c5c 100644 --- a/example/Performance/Performance.cpp +++ b/example/Performance/Performance.cpp @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include #include @@ -495,9 +495,9 @@ void TestAndWriteResults() for ( PerfResultList::const_iterator pResult = results.begin(); pResult != results.end(); ++pResult ) { - output << std::fixed << std::setprecision( 0 ) << - std::setw( 8 ) << pResult->inStateRatio_ * 100 << ',' << - std::setw( 8 ) << pResult->nanoSecondsPerReaction_ << "\n"; + output << std::fixed << boost::detail::setprecision( 0 ) << + boost::detail::setw( 8 ) << pResult->inStateRatio_ * 100 << ',' << + boost::detail::setw( 8 ) << pResult->nanoSecondsPerReaction_ << "\n"; } }