Update of /cvsroot/boost/boost/libs/spirit/phoenix/test/algorithm
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19832
Modified Files:
Tag: SPIRIT_RC_1_8_5
transformation1.cpp
Log Message:
sync from spirit PHOENIX_V2 branch
Index: transformation1.cpp
===================================================================
RCS file:
/cvsroot/boost/boost/libs/spirit/phoenix/test/algorithm/Attic/transformation1.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- transformation1.cpp 11 Oct 2006 09:46:20 -0000 1.1.2.1
+++ transformation1.cpp 1 Dec 2006 01:55:49 -0000 1.1.2.2
@@ -34,6 +34,20 @@
};
};
+ void swap_test()
+ {
+ using namespace boost::phoenix;
+ int a = 123;
+ int b = 456;
+ swap(ref(a), ref(b))();
+ BOOST_TEST(a == 456 && b == 123);
+ swap(ref(a), _1)(b);
+ BOOST_TEST(a == 123 && b == 456);
+ swap(_1, _2)(a, b);
+ BOOST_TEST(a == 456 && b == 123);
+ return;
+ }
+
void copy_test()
{
using namespace boost::phoenix;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs