|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49113 - in branches/bcbboost: boost/spirit/home/phoenix/core/detail boost/thread/detail libs/thread/test libs/type_traits/test tools/build/v2
From: nicola.musatti_at_[hidden]
Date: 2008-10-02 13:47:30
Author: nmusatti
Date: 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
New Revision: 49113
URL: http://svn.boost.org/trac/boost/changeset/49113
Log:
Merge from trunk
Text files modified:
branches/bcbboost/boost/spirit/home/phoenix/core/detail/function_eval.hpp | 8 ++++----
branches/bcbboost/boost/thread/detail/move.hpp | 4 ++--
branches/bcbboost/boost/thread/detail/thread.hpp | 4 ++--
branches/bcbboost/libs/thread/test/test_thread_move.cpp | 13 +++++++++++++
branches/bcbboost/libs/type_traits/test/tricky_partial_spec_test.cpp | 2 ++
branches/bcbboost/tools/build/v2/nightly.sh | 2 +-
branches/bcbboost/tools/build/v2/roll.sh | 4 ++--
7 files changed, 26 insertions(+), 11 deletions(-)
Modified: branches/bcbboost/boost/spirit/home/phoenix/core/detail/function_eval.hpp
==============================================================================
--- branches/bcbboost/boost/spirit/home/phoenix/core/detail/function_eval.hpp (original)
+++ branches/bcbboost/boost/spirit/home/phoenix/core/detail/function_eval.hpp 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -32,8 +32,8 @@
template <typename Env, typename F>
struct result
{
- typedef typename F::template result<Env>::type function;
- typedef typename function::result_type type;
+ typedef typename F::template result<Env>::type fn;
+ typedef typename fn::result_type type;
};
template <typename RT, typename Env, typename F>
@@ -96,7 +96,7 @@
, BOOST_PP_ENUM_PARAMS(N, typename A)>
struct result
{
- typedef typename F::template result<Env>::type function;
+ typedef typename F::template result<Env>::type fn;
BOOST_PP_REPEAT(N, PHOENIX_GET_ARG, _)
typedef BOOST_PP_CAT(mpl::vector, N)
@@ -104,7 +104,7 @@
args;
typedef typename
- function::template result<BOOST_PP_ENUM_PARAMS(N, a)>
+ fn::template result<BOOST_PP_ENUM_PARAMS(N, a)>
function_apply;
typedef typename
Modified: branches/bcbboost/boost/thread/detail/move.hpp
==============================================================================
--- branches/bcbboost/boost/thread/detail/move.hpp (original)
+++ branches/bcbboost/boost/thread/detail/move.hpp 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -41,9 +41,9 @@
#ifndef BOOST_NO_SFINAE
template<typename T>
- typename enable_if<boost::is_convertible<T&,detail::thread_move_t<T> >, detail::thread_move_t<T> >::type move(T& t)
+ typename enable_if<boost::is_convertible<T&,detail::thread_move_t<T> >, T >::type move(T& t)
{
- return t;
+ return T(detail::thread_move_t<T>(t));
}
#endif
Modified: branches/bcbboost/boost/thread/detail/thread.hpp
==============================================================================
--- branches/bcbboost/boost/thread/detail/thread.hpp (original)
+++ branches/bcbboost/boost/thread/detail/thread.hpp 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -339,9 +339,9 @@
return t;
}
#else
- inline detail::thread_move_t<thread> move(detail::thread_move_t<thread> t)
+ inline thread move(detail::thread_move_t<thread> t)
{
- return t;
+ return thread(t);
}
#endif
Modified: branches/bcbboost/libs/thread/test/test_thread_move.cpp
==============================================================================
--- branches/bcbboost/libs/thread/test/test_thread_move.cpp (original)
+++ branches/bcbboost/libs/thread/test/test_thread_move.cpp 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -25,6 +25,18 @@
x.join();
}
+boost::thread make_thread_return_lvalue()
+{
+ boost::thread t(do_nothing);
+ return boost::move(t);
+}
+
+void test_move_from_function_return_lvalue()
+{
+ boost::thread x=make_thread_return_lvalue();
+ x.join();
+}
+
boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[])
{
@@ -33,5 +45,6 @@
test->add(BOOST_TEST_CASE(test_move_on_construction));
test->add(BOOST_TEST_CASE(test_move_from_function_return));
+ test->add(BOOST_TEST_CASE(test_move_from_function_return_lvalue));
return test;
}
Modified: branches/bcbboost/libs/type_traits/test/tricky_partial_spec_test.cpp
==============================================================================
--- branches/bcbboost/libs/type_traits/test/tricky_partial_spec_test.cpp (original)
+++ branches/bcbboost/libs/type_traits/test/tricky_partial_spec_test.cpp 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -56,7 +56,9 @@
//
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char&>::value, ALIGNOF(void*));
+#if !defined __CODEGEARC__ // CodeGear cannot parse function references inside alignof
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char (&)(int)>::value, ALIGNOF(void*));
+#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char(&)[4]>::value, ALIGNOF(void*));
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base&,Derived>::value), false);
Modified: branches/bcbboost/tools/build/v2/nightly.sh
==============================================================================
--- branches/bcbboost/tools/build/v2/nightly.sh (original)
+++ branches/bcbboost/tools/build/v2/nightly.sh 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -25,5 +25,5 @@
./roll.sh > ../roll-log 2>&1
cd ..
echo "Uploading packages"
-scp boost-build.zip boost-build.tar.bz2 vladimir_prus_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2 > scp-log
+scp boost-build.zip boost-build.tar.bz2 vladimir_prus,boost_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2 > scp-log
echo "Nightly build successful"
Modified: branches/bcbboost/tools/build/v2/roll.sh
==============================================================================
--- branches/bcbboost/tools/build/v2/roll.sh (original)
+++ branches/bcbboost/tools/build/v2/roll.sh 2008-10-02 13:47:30 EDT (Thu, 02 Oct 2008)
@@ -65,5 +65,5 @@
EOF`
echo $x
perl -pi -e "s|</body>|$x</body>|" `find doc -name '*.html'`
-scp -r doc example boost_build.png *.html hacking.txt vladimir_prus_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2
-scp ../userman.pdf vladimir_prus_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2/doc
+scp -r doc example boost_build.png *.html hacking.txt vladimir_prus,boost_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2
+scp ../userman.pdf vladimir_prus,boost_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2/doc
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