This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Why is tuple used in unique_ptr


Dear all, I am looking at unique_ptr implementation and I wonder what
is the motivation to use tuple to hold the pointer and it's deleter,
rather than letting them be members of the unitque_ptr on their own?
It seems that doing std::get<0>(_M_t); or std::get<1>(_M_t); is less
clear, than referring to member names of pointer and deleter.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]