Fix cpp11_rvalue_refrence3 testcase clang warning
cpp11_rvalue_reference3_wrap.cxx:256:38: warning: binding reference member 'member_rvalue_ref_ptr1' to
a temporary value [-Wdangling-field]
Thing *&& member_rvalue_ref_ptr1 = 0;
^
This commit is contained in:
parent
55e835e0ae
commit
7231c2a065
1 changed files with 8 additions and 8 deletions
|
|
@ -26,10 +26,10 @@ void takeit5(Thing const*const&& t) {}
|
|||
|
||||
struct Containing {
|
||||
Thing && member_rvalue_ref;
|
||||
Thing *&& member_rvalue_ref_ptr1 = 0;
|
||||
Thing const*&& member_rvalue_ref_ptr2 = 0;
|
||||
Thing *const&& member_rvalue_ref_ptr3 = 0;
|
||||
Thing const*const &&member_rvalue_ref_ptr4 = 0;
|
||||
Thing *&& member_rvalue_ref_ptr1;
|
||||
Thing const*&& member_rvalue_ref_ptr2;
|
||||
Thing *const&& member_rvalue_ref_ptr3;
|
||||
Thing const*const &&member_rvalue_ref_ptr4;
|
||||
|
||||
Containing(Thing&&r, Thing*&& r1, Thing const*&& r2, Thing *const&& r3, Thing const*const && r4) :
|
||||
member_rvalue_ref(std::move(r)),
|
||||
|
|
@ -63,10 +63,10 @@ void int_takeit5(int const*const&& t) {}
|
|||
|
||||
struct IntContaining {
|
||||
int && member_rvalue_ref;
|
||||
int *&& member_rvalue_ref_ptr1 = 0;
|
||||
int const*&& member_rvalue_ref_ptr2 = 0;
|
||||
int *const&& member_rvalue_ref_ptr3 = 0;
|
||||
int const*const &&member_rvalue_ref_ptr4 = 0;
|
||||
int *&& member_rvalue_ref_ptr1;
|
||||
int const*&& member_rvalue_ref_ptr2;
|
||||
int *const&& member_rvalue_ref_ptr3;
|
||||
int const*const &&member_rvalue_ref_ptr4;
|
||||
|
||||
IntContaining(int&& r, int*&& r1, int const*&& r2, int *const&& r3, int const*const && r4) :
|
||||
member_rvalue_ref(std::move(r)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue