Subject: Re: std::make_shared and type deduction
From: Hans Ã berg (haberg-1_at_[hidden])
Date: 2020-07-10 15:02:01
> On 10 Jul 2020, at 21:57, Kyle Knoepfel <kyleknoepfel_at_[hidden]> wrote:
> If I were in control of the type, then sure, that could work. But Foo<T> (from the original post) could represent any template (or type, for that matter), which I don't necessarily have control over. For example, I can't add new_p member functions to std::vector. The solution would be a free function, and Thiago's suggested such names as clone_unique(..)/clone_shared(..), which accurately describe the need.
The idea would be to have something like that in the standard.
STD-DISCUSSION list run by email@example.com
Older Archives on Google Groups