|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65167 - trunk/libs/mpl/test
From: steven_at_[hidden]
Date: 2010-09-01 12:08:31
Author: steven_watanabe
Date: 2010-09-01 12:08:21 EDT (Wed, 01 Sep 2010)
New Revision: 65167
URL: http://svn.boost.org/trac/boost/changeset/65167
Log:
Fix for_each test for C++0x
Text files modified:
trunk/libs/mpl/test/for_each.cpp | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
Modified: trunk/libs/mpl/test/for_each.cpp
==============================================================================
--- trunk/libs/mpl/test/for_each.cpp (original)
+++ trunk/libs/mpl/test/for_each.cpp 2010-09-01 12:08:21 EDT (Wed, 01 Sep 2010)
@@ -55,6 +55,11 @@
# pragma warning(disable:985)
#endif
+void push_back(std::vector<int>* c, int i)
+{
+ c->push_back(i);
+}
+
int main()
{
typedef mpl::list<char,short,int,long,float,double> types;
@@ -63,16 +68,9 @@
typedef mpl::range_c<int,0,10> numbers;
std::vector<int> v;
-#if defined(__SGI_STL_PORT)
- void (std::vector<int>::* push_back)(int const&) = &std::vector<int>::push_back;
mpl::for_each<numbers>(
- boost::bind(push_back, &v, _1)
+ boost::bind(&push_back, &v, _1)
);
-#else
- mpl::for_each<numbers>(
- boost::bind(&std::vector<int>::push_back, &v, _1)
- );
-#endif
mpl::for_each< numbers >(value_printer(std::cout));
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