Date: Sun, 10 Nov 2024 23:27:43 +0000
On Sun, Nov 10, 2024 at 11:17 PM Thiago Macieira via Std-Discussion <
> std-discussion_at_[hidden]> wrote:
> Std-Discussion wrote:
> > Say one could ensure padding bits set to 0 on creation or during
> > the lifetime of an object and later compare the object with *memcmp
> *knowing
> > ahead that the object value does not change and even it does one could
> > again reset padding bits to 0 to use *memcmp*
> Are you trying to type-erase a comparison operation?
> Because if not, just do a regular operator== comparison over the range of
> items and the compiler will emit the memcmp() calls for you if the type is
> trivially comparable.
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Principal Engineer - Intel DCAI Platform & System Engineering
>
> Just want to make padding bits stable and don't change *between *subsequent
*value *modifications so that memcmp actually works.
-Mykola
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
On Sunday 10 November 2024 14:55:00 Pacific Standard Time Mykola Garkusha
> via
>
> std-discussion_at_[hidden]> wrote:
> Std-Discussion wrote:
> > Say one could ensure padding bits set to 0 on creation or during
> > the lifetime of an object and later compare the object with *memcmp
> *knowing
> > ahead that the object value does not change and even it does one could
> > again reset padding bits to 0 to use *memcmp*
> Are you trying to type-erase a comparison operation?
> Because if not, just do a regular operator== comparison over the range of
> items and the compiler will emit the memcmp() calls for you if the type is
> trivially comparable.
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Principal Engineer - Intel DCAI Platform & System Engineering
>
> Just want to make padding bits stable and don't change *between *subsequent
*value *modifications so that memcmp actually works.
-Mykola
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
On Sunday 10 November 2024 14:55:00 Pacific Standard Time Mykola Garkusha
> via
>
Received on 2024-11-10 23:27:56