C++ Logo

std-proposals

Advanced search

Re: [std-proposals] C-style array specialization for std::get

From: Zhihao Yuan <zy_at_[hidden]>
Date: Sun, 24 Apr 2022 22:40:06 +0000
Looks good to me.

You can ask in cpplang slack channel about the next step.

Sent from ProtonMail mobile



\-------- Original Message --------
On Apr 24, 2022, 9:35 AM, Paolo Di Giglio via Std-Proposals < std-proposals_at_[hidden]> wrote:

>
>
>
> Hi everybody,
>
> I'd like to ping you again for a feedback on my last draft.
>
> If there is none, I guess I should reach for the LEWG study-group
> chairperson to submit my paper; right?
>
> Thanks,
> Paolo
>
>
>
>
>
> Il giorno mar 19 apr 2022 alle ore 15:40 Paolo Di Giglio <[p.digiglio91_at_[hidden]][p.digiglio91_gmail.com]> ha scritto:
>
>
> > Hi everybody,
> >
> > You can find an updated version of my draft at the following URL:
> >
> > [https://pdigiglio.github.io/papers/tuple\_protocol\_for\_c\_style\_arrays/draft1.html][https_pdigiglio.github.io_papers_tuple_protocol_for_c_style_arrays_draft1.html]
> >
> > With respect to draft0, I:
> >
> > \* Dropped the volatile-qualified specializations (and discussed the
> > behavior of std::tuple\_element\_t<0, int volatile\[42\]>).
> >
> > \* Removed "Questions" section.
> >
> > I'm looking forward for your feedbacks.
> >
> > Thanks,
> > Paolo
> >
> >
> >
> >
> >
> > Il giorno lun 18 apr 2022 alle ore 18:48 Zhihao Yuan <[zy_at_[hidden]][zy_miator.net]> ha scritto:
> >
> >
> > > On Monday, April 18th, 2022 at 8:24 AM, Paolo Di Giglio <[p.digiglio91_at_[hidden]][p.digiglio91_gmail.com]> wrote:
> > >
> > >
> > >
> > >
> > > >
> > > > > I slightly prefer the constraining specification, so that you don't
> > > > > need to thinking about the fate of volatile tuple\_element.
> > > >
> > > > I believe you need to think about volatile in either case.
> > > >
> > > > The subtlety with C-style array types is that there's no difference
> > > > between applying a cv-qualifier to the array or to the element type:
> > > > i.e. a constant array of N integers is the same as an array of N
> > > > constant integers. This is not the case with std::array.
> > > >
> > > > My understanding is that the standard will drop the tuple-protocol
> > > > support for volatile-qualified std::array; not for std::array of
> > > > volatile-qualified elements. I.e.
> > > >
> > > > //using namespace std;
> > > > tuple\_element\_t<0, array<int, 42> volatile> // Won't compile
> > > >
> > > >
> > > > tuple\_element\_t<0, array<int volatile, 42>> // Ok: int volatile
> > > >
> > >
> > >
> > >
> > >
> > > I'm not sure whether std::array supports
> > >
> > > T volatile element type. It's very likely
> > >
> > > array<T volatile, N> doesn't meet the
> > >
> > > *Container* requirements.
> > >
> > >
> > >
> > >
> > > Regardless, this can be discussed in
> > >
> > > LEWG.
> > >
> > >
> > >
> > >
> > > \--
> > >
> > > Zhihao
> > >
> > >
> > >


[p.digiglio91_gmail.com]: mailto:p.digiglio91_at_[hidden]
[https_pdigiglio.github.io_papers_tuple_protocol_for_c_style_arrays_draft1.html]: https://pdigiglio.github.io/papers/tuple_protocol_for_c_style_arrays/draft1.html
[zy_miator.net]: mailto:zy_at_[hidden]

Received on 2022-04-24 22:40:15