RFC: Move Library Fundamentals components to fundamentals_v2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RFC: Move Library Fundamentals components to fundamentals_v2

Jonathan Wakely-3
As I've noted in the LFTSv2 status table, we don't implement
https://wg21.link/n4521 because our LFTSv1 material is still in
namespace fundamentals_v1 not fundamentals_v2.

Should we change that?

They're inline namespaces, so source code doesn't need to be changed
to use the new names, but it does change the mangled names of types
like std::experimental::string_view.

We could provide a macro that determines which namespace to use, as
demonstrated in the attached patch. It would need to change every use
of fundamentals_v1 as shown for <experimental/string_view>.


patch.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Move Library Fundamentals components to fundamentals_v2

Ville Voutilainen
On Wed, 28 Nov 2018 at 15:56, Jonathan Wakely <[hidden email]> wrote:

>
> As I've noted in the LFTSv2 status table, we don't implement
> https://wg21.link/n4521 because our LFTSv1 material is still in
> namespace fundamentals_v1 not fundamentals_v2.
>
> Should we change that?
>
> They're inline namespaces, so source code doesn't need to be changed
> to use the new names, but it does change the mangled names of types
> like std::experimental::string_view.
>
> We could provide a macro that determines which namespace to use, as
> demonstrated in the attached patch. It would need to change every use
> of fundamentals_v1 as shown for <experimental/string_view>.

My original plan was to never do the move/rename of the inline
namespace for things
that existed in LTFTSv1 and were just spec-moved to LFTSv2. I don't
see why that would be helpful or necessary.
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Move Library Fundamentals components to fundamentals_v2

Jonathan Wakely-3
On 28/11/18 16:05 +0200, Ville Voutilainen wrote:

>On Wed, 28 Nov 2018 at 15:56, Jonathan Wakely <[hidden email]> wrote:
>>
>> As I've noted in the LFTSv2 status table, we don't implement
>> https://wg21.link/n4521 because our LFTSv1 material is still in
>> namespace fundamentals_v1 not fundamentals_v2.
>>
>> Should we change that?
>>
>> They're inline namespaces, so source code doesn't need to be changed
>> to use the new names, but it does change the mangled names of types
>> like std::experimental::string_view.
>>
>> We could provide a macro that determines which namespace to use, as
>> demonstrated in the attached patch. It would need to change every use
>> of fundamentals_v1 as shown for <experimental/string_view>.
>
>My original plan was to never do the move/rename of the inline
>namespace for things
>that existed in LTFTSv1 and were just spec-moved to LFTSv2. I don't
>see why that would be helpful or necessary.

Yes, I'm also OK with just leaving things as they are.

Reply | Threaded
Open this post in threaded view
|

Re: RFC: Move Library Fundamentals components to fundamentals_v2

Ville Voutilainen
On Wed, 28 Nov 2018 at 16:11, Jonathan Wakely <[hidden email]> wrote:

> >> As I've noted in the LFTSv2 status table, we don't implement
> >> https://wg21.link/n4521 because our LFTSv1 material is still in
> >> namespace fundamentals_v1 not fundamentals_v2.
> >>
> >> Should we change that?
> >>
> >> They're inline namespaces, so source code doesn't need to be changed
> >> to use the new names, but it does change the mangled names of types
> >> like std::experimental::string_view.
> >>
> >> We could provide a macro that determines which namespace to use, as
> >> demonstrated in the attached patch. It would need to change every use
> >> of fundamentals_v1 as shown for <experimental/string_view>.
> >
> >My original plan was to never do the move/rename of the inline
> >namespace for things
> >that existed in LTFTSv1 and were just spec-moved to LFTSv2. I don't
> >see why that would be helpful or necessary.
>
> Yes, I'm also OK with just leaving things as they are.

I could entertain moving things from v1 to v2 when there's an actual
incompatibility, but
we have backported various optional changes hyper-aggressively, for
instance, so it seems
unlikely that we would really have the same name with different
meanings in v1 and v2 namespaces.

We could of course suggest that our committee friends stop making such
pointless changes as moving
the LFTSv1 things to the LFTSv2 namespace.
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Move Library Fundamentals components to fundamentals_v2

Thomas Rodgers
In reply to this post by Ville Voutilainen
> My original plan was to never do the move/rename of the inline
> namespace for things
> that existed in LTFTSv1 and were just spec-moved to LFTSv2. I don't
> see why that would be helpful or necessary.

+1

Ville Voutilainen writes:

> On Wed, 28 Nov 2018 at 15:56, Jonathan Wakely <[hidden email]> wrote:
>>
>> As I've noted in the LFTSv2 status table, we don't implement
>> https://wg21.link/n4521 because our LFTSv1 material is still in
>> namespace fundamentals_v1 not fundamentals_v2.
>>
>> Should we change that?
>>
>> They're inline namespaces, so source code doesn't need to be changed
>> to use the new names, but it does change the mangled names of types
>> like std::experimental::string_view.
>>
>> We could provide a macro that determines which namespace to use, as
>> demonstrated in the attached patch. It would need to change every use
>> of fundamentals_v1 as shown for <experimental/string_view>.
>
> My original plan was to never do the move/rename of the inline
> namespace for things
> that existed in LTFTSv1 and were just spec-moved to LFTSv2. I don't
> see why that would be helpful or necessary.