Date: Sat, 2 Sep 2023 00:07:47 +0100
On Sat, Sep 2, 2023 at 12:00 AM sasho648 wrote:
>
> What is there to standardise - it's working as it's in my opinion. Why do you think it won't work with another compiler?
Three problems:
(1) If you do "#define private public" before including a header file,
then it affects every class in that header file.
(2) You can break SFINAE if a previously inaccessible method has
become accessible, or if a private constructor has become public.
(3) I don't know of any compiler on which it would cause an ABI break,
but maybe there is one out there that would change the mangling of the
name or the layout of the data members (or the order of function
pointers in the Vtable).
>
> What is there to standardise - it's working as it's in my opinion. Why do you think it won't work with another compiler?
Three problems:
(1) If you do "#define private public" before including a header file,
then it affects every class in that header file.
(2) You can break SFINAE if a previously inaccessible method has
become accessible, or if a private constructor has become public.
(3) I don't know of any compiler on which it would cause an ABI break,
but maybe there is one out there that would change the mangling of the
name or the layout of the data members (or the order of function
pointers in the Vtable).
Received on 2023-09-01 23:08:00