Why is tuple used in unique_ptr

Anton Daneyko self@mezhaka.com
Sun Mar 10 23:27:00 GMT 2013


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.



More information about the Libstdc++ mailing list