Ticket #7577: base_from_member.patch
File base_from_member.patch, 767 bytes (added by , 10 years ago) |
---|
-
(a) d:\boost_1_51_0\boost\utility\base_from_member.hpp vs. (b) D:\Documents\Visual
a b 77 77 78 78 }; // boost::base_from_member 79 79 80 81 // Specialization to deal with references correctly. The general 82 // template constructors take their arguments by value, resulting 83 // in a dangling reference. 84 85 // Contributed by Agustín K-ballo Bergé 86 87 template < typename MemberType, int UniqueId > 88 class base_from_member< MemberType&, UniqueId > 89 { 90 protected: 91 MemberType& member; 92 93 explicit base_from_member( MemberType& x ) 94 : member( x ) 95 {} 96 97 }; // boost::base_from_member 98 80 99 } // namespace boost 81 100 82 101