Oh< I am sorry, Ignore the message.
 
With best regards,
(Vlad from Moscow)
 
 
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com
 
 
Четверг, 24 июня 2021, 13:44 +03:00 от Vladimir Grigoriev via Std-Discussion <std-discussion@lists.isocpp.org>:
 
And why are you using release instead of reset in your example?
 
With best regards,
(Vlad from Moscow)
 
 
Четверг, 24 июня 2021, 1:11 +03:00 от Robert A.H. Leahy <rleahy@rleahy.ca>:
 
That would produce a false positive on this snippet:
 
std::vector<int*> v;
// Assume there is machinery here that deletes
// all pointers in v on scope exit
auto ptr = std::make_unique<int>(5);
v.push_back(ptr.get());
ptr.release();
 
Thanks,
 
--Robert
 
 

From: Std-Discussion <std-discussion-bounces@lists.isocpp.org> on behalf of Vladimir Grigoriev via Std-Discussion <std-discussion@lists.isocpp.org>
Sent: Wednesday, June 23, 2021 18:08
To: std-discussion <std-discussion@lists.isocpp.org>
Cc: Vladimir Grigoriev <vlad.moscow@mail.ru>
Subject: [std-discussion] Member function release of std::unique_ptr
 
Why does not the member function release of the class template std::unique_ptr have the attribute nodiscard?
 
With best regards,
(Vlad from Moscow)
 
 
--
Std-Discussion mailing list
Std-Discussion@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion