mirror of
https://github.com/boostorg/lambda.git
synced 2026-01-21 17:02:36 +00:00
Compare commits
24 Commits
svn-branch
...
boost-1.44
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eca378e24 | ||
|
|
2c14c3a13b | ||
|
|
0d0f71272e | ||
|
|
08b3f6336c | ||
|
|
e368877636 | ||
|
|
22bc52b7c4 | ||
|
|
8a943f6510 | ||
|
|
d69f83d074 | ||
|
|
7648a7adf1 | ||
|
|
48e6f45d92 | ||
|
|
927a04351e | ||
|
|
b5b41af8f4 | ||
|
|
1f6ca994e6 | ||
|
|
4a254c4161 | ||
|
|
e67976c740 | ||
|
|
a0cd34c938 | ||
|
|
672c8e10d4 | ||
|
|
87dd3997e7 | ||
|
|
b112fb9254 | ||
|
|
13ec0c5bbc | ||
|
|
29ab5a2814 | ||
|
|
a0cfe43611 | ||
|
|
fe858cf734 | ||
|
|
b3120233dc |
@@ -16,9 +16,6 @@
|
||||
#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 {
|
||||
@@ -240,26 +237,22 @@ struct function_adaptor<T Object::*> {
|
||||
// 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<unref_type>::value,
|
||||
typedef typename detail::IF<boost::is_const<argument_type>::value,
|
||||
typename boost::add_const<T>::type,
|
||||
T
|
||||
>::RET properly_consted_return_type;
|
||||
|
||||
typedef typename detail::IF<boost::is_volatile<unref_type>::value,
|
||||
typedef typename detail::IF<
|
||||
boost::is_volatile<properly_consted_return_type>::value,
|
||||
typename boost::add_volatile<properly_consted_return_type>::type,
|
||||
properly_consted_return_type
|
||||
>::RET properly_cvd_return_type;
|
||||
|
||||
|
||||
public:
|
||||
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;
|
||||
typedef typename
|
||||
boost::add_reference<properly_cvd_return_type>::type type;
|
||||
};
|
||||
|
||||
template <class RET>
|
||||
|
||||
@@ -80,23 +80,6 @@ void test_member_functions()
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user