Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70065 - in branches/release: . boost boost/bimap boost/detail boost/fusion boost/fusion/container/list/detail boost/gil boost/graph boost/icl boost/integer boost/interprocess boost/intrusive boost/iterator boost/lambda/detail boost/numeric/ublas boost/program_options boost/property_tree boost/python boost/signals boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/thread boost/typeof boost/utility boost/uuid boost/variant boost/wave libs libs/bimap libs/date_time libs/fusion libs/graph_parallel libs/icl libs/icl/doc libs/icl/doc/html libs/icl/doc/html/header/boost/icl libs/icl/test libs/icl/test/test_doc_code_ libs/integer libs/lambda/test libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/numeric/ublas libs/numeric/ublas/doc libs/parameter/doc/html libs/program_options libs/property_tree libs/python libs/serialization libs/serialization/doc libs/serialization/vc7ide libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/thread libs/timer libs/typeof/doc libs/units/test libs/utility libs/utility/swap/test libs/uuid libs/wave status tools tools/bcp tools/inspect tools/regression tools/regression/src tools/wave
From: steven_at_[hidden]
Date: 2011-03-17 12:29:30


Author: steven_watanabe
Date: 2011-03-17 12:29:28 EDT (Thu, 17 Mar 2011)
New Revision: 70065
URL: http://svn.boost.org/trac/boost/changeset/70065

Log:
Merge [67640] from the trunk.
Properties modified:
   branches/release/ (props changed)
   branches/release/INSTALL (props changed)
   branches/release/Jamroot (props changed)
   branches/release/LICENSE_1_0.txt (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost-build.jam (props changed)
   branches/release/boost.css (props changed)
   branches/release/boost.png (props changed)
   branches/release/boost/bimap/ (props changed)
   branches/release/boost/concept_check.hpp (props changed)
   branches/release/boost/config.hpp (props changed)
   branches/release/boost/detail/endian.hpp (props changed)
   branches/release/boost/fusion/ (props changed)
   branches/release/boost/fusion/container/list/detail/build_cons.hpp (props changed)
   branches/release/boost/gil/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/icl/ (props changed)
   branches/release/boost/integer/ (props changed)
   branches/release/boost/interprocess/ (props changed)
   branches/release/boost/intrusive/ (props changed)
   branches/release/boost/iterator/iterator_facade.hpp (props changed)
   branches/release/boost/math_fwd.hpp (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/numeric/ublas/functional.hpp (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/python/ (props changed)
   branches/release/boost/signals/ (props changed)
   branches/release/boost/signals2.hpp (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/boost/statechart/ (props changed)
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/boost/token_functions.hpp (props changed)
   branches/release/boost/typeof/message.hpp (props changed)
   branches/release/boost/typeof/register_functions.hpp (props changed)
   branches/release/boost/typeof/register_functions_iterate.hpp (props changed)
   branches/release/boost/typeof/typeof.hpp (props changed)
   branches/release/boost/typeof/unsupported.hpp (props changed)
   branches/release/boost/utility/ (props changed)
   branches/release/boost/utility/value_init.hpp (props changed)
   branches/release/boost/uuid/ (props changed)
   branches/release/boost/variant/ (props changed)
   branches/release/boost/version.hpp (props changed)
   branches/release/boost/wave/ (props changed)
   branches/release/bootstrap.bat (props changed)
   branches/release/bootstrap.sh (props changed)
   branches/release/index.htm (props changed)
   branches/release/index.html (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/bimap/ (props changed)
   branches/release/libs/date_time/ (props changed)
   branches/release/libs/fusion/ (props changed)
   branches/release/libs/graph_parallel/ (props changed)
   branches/release/libs/icl/ (props changed)
   branches/release/libs/icl/doc/ (props changed)
   branches/release/libs/icl/doc/html/ (props changed)
   branches/release/libs/icl/doc/html/header/boost/icl/ (props changed)
   branches/release/libs/icl/test/ (props changed)
   branches/release/libs/icl/test/test_doc_code_/ (props changed)
   branches/release/libs/integer/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/maintainers.txt (props changed)
   branches/release/libs/mpi/build/ (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
   branches/release/libs/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/parameter/doc/html/index.html (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/python/ (props changed)
   branches/release/libs/serialization/ (props changed)
   branches/release/libs/serialization/doc/ (props changed)
   branches/release/libs/serialization/vc7ide/ (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
   branches/release/libs/statechart/ (props changed)
   branches/release/libs/static_assert/ (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/timer/ (props changed)
   branches/release/libs/typeof/doc/typeof.qbk (props changed)
   branches/release/libs/units/test/ (props changed)
   branches/release/libs/utility/ (props changed)
   branches/release/libs/utility/swap.html (props changed)
   branches/release/libs/utility/swap/test/std_bitset.cpp (props changed)
   branches/release/libs/utility/value_init.htm (props changed)
   branches/release/libs/utility/value_init_test.cpp (props changed)
   branches/release/libs/uuid/ (props changed)
   branches/release/libs/wave/ (props changed)
   branches/release/rst.css (props changed)
   branches/release/status/ (props changed)
   branches/release/status/Jamfile.v2 (props changed)
   branches/release/status/explicit-failures-markup.xml (props changed)
   branches/release/tools/ (props changed)
   branches/release/tools/bcp/ (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/regression/ (props changed)
   branches/release/tools/regression/src/library_status.cpp (props changed)
   branches/release/tools/wave/ (props changed)
Text files modified:
   branches/release/boost/lambda/detail/function_adaptors.hpp | 17 ++++++++++++-----
   branches/release/libs/lambda/test/bind_tests_simple.cpp | 17 +++++++++++++++++
   2 files changed, 29 insertions(+), 5 deletions(-)

Modified: branches/release/boost/lambda/detail/function_adaptors.hpp
==============================================================================
--- branches/release/boost/lambda/detail/function_adaptors.hpp (original)
+++ branches/release/boost/lambda/detail/function_adaptors.hpp 2011-03-17 12:29:28 EDT (Thu, 17 Mar 2011)
@@ -16,6 +16,9 @@
 #include "boost/tuple/tuple.hpp"
 #include "boost/type_traits/same_traits.hpp"
 #include "boost/type_traits/remove_reference.hpp"
+#include "boost/type_traits/remove_cv.hpp"
+#include "boost/type_traits/add_const.hpp"
+#include "boost/type_traits/add_volatile.hpp"
 #include "boost/utility/result_of.hpp"
 
 namespace boost {
@@ -237,22 +240,26 @@
   // the data member is accessed is const, and finally adding a reference
   template<class Args> class sig {
     typedef typename boost::tuples::element<1, Args>::type argument_type;
+ typedef typename boost::remove_reference<
+ argument_type
+ >::type unref_type;
 
- typedef typename detail::IF<boost::is_const<argument_type>::value,
+ typedef typename detail::IF<boost::is_const<unref_type>::value,
       typename boost::add_const<T>::type,
       T
>::RET properly_consted_return_type;
 
- typedef typename detail::IF<
- boost::is_volatile<properly_consted_return_type>::value,
+ typedef typename detail::IF<boost::is_volatile<unref_type>::value,
       typename boost::add_volatile<properly_consted_return_type>::type,
       properly_consted_return_type
>::RET properly_cvd_return_type;
 
 
   public:
- typedef typename
- boost::add_reference<properly_cvd_return_type>::type type;
+ typedef typename detail::IF<boost::is_reference<argument_type>::value,
+ typename boost::add_reference<properly_cvd_return_type>::type,
+ typename boost::remove_cv<T>::type
+ >::RET type;
   };
 
   template <class RET>

Modified: branches/release/libs/lambda/test/bind_tests_simple.cpp
==============================================================================
--- branches/release/libs/lambda/test/bind_tests_simple.cpp (original)
+++ branches/release/libs/lambda/test/bind_tests_simple.cpp 2011-03-17 12:29:28 EDT (Thu, 17 Mar 2011)
@@ -80,6 +80,23 @@
   // bind(&A::add, a, _1);
 }
 
+struct B {
+ B(int n) : i(n) {};
+ int i;
+};
+
+void test_data_members()
+{
+ using boost::ref;
+ B b(10);
+ BOOST_CHECK(bind(&B::i, ref(b))() == 10);
+ BOOST_CHECK(bind(&B::i, b)() == 10);
+ BOOST_CHECK(bind(&B::i, _1)(b) == 10);
+ BOOST_CHECK(bind(&B::i, _1)(B(11)) == 11);
+ bind(&B::i, ref(b))() = 1;
+ BOOST_CHECK(b.i == 1);
+}
+
 int test_main(int, char *[]) {
 
   int i = 1; int j = 2; int k = 3;


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