C++ Logo

std-proposals

Advanced search

Re: [std-proposals] unimplemented attribute

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Thu, 20 Mar 2025 19:08:16 +0100
So the warning/error message cannot be prevented? Except globally or with some #pragma?   Or does or could the implementation be inlined into the same translation unit? And then the compiler would know?     If you really use that feature, perhaps several functions from different libraries are affected and you want to selectively see the messages.   -----Ursprüngliche Nachricht----- Von:Hans Åberg <haberg_1_at_[hidden]> Gesendet:Do 20.03.2025 18:58 Betreff:Re: [std-proposals] unimplemented attribute An:std-proposals_at_[hidden]; CC:Sebastian Wittmeier <wittmeier_at_[hidden]>; If a declaration is marked “unimplemented”, then also the definition must have it. If implemented in a later compiler version, then this label is removed, and the linker chooses the definition without the label. A similar linker override already exists for global operator new. > On 20 Mar 2025, at 18:22, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote: > > But honestly IMHO not very clear or convincing, yet. > As it is your proposal, feel free to just continue in the other sub-thread of course. >  -----Ursprüngliche Nachricht----- > Von: Hans Åberg via Std-Proposals <std-proposals_at_[hidden]> > Gesendet: Do 20.03.2025 18:21 > Betreff: Re: [std-proposals] unimplemented attribute > An: std-proposals_at_[hidden]; > CC: Hans Åberg <haberg_1_at_[hidden]>; > I just described a method in another post. > > > > On 20 Mar 2025, at 16:52, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote: > > > > AW: [std-proposals] unimplemented attribute body { font-family: Arial, Verdana, Sans-Serif ! important; font-size: 12px; padding: 5px 5px 5px 5px; margin: 0px; border-style: none; background-color: #ffffff; } p, ul, li { margin-top: 0px; margin-bottom: 0px; } So - as others have written - for the first part you have to argue, why it is much different from declaring either as =delete or not at all. > > For the second part, how would a user implement it? > >  - Is the function defined in the same translation unit? > >  - Or only declared? This time without [[unimplemented]]? > >  - Or both defined and declared? > >  - Or nothing would change in the translation unit, but the user would turn off the unimplemented warnings? And the linker would do the rest? > > In the fourth option: If this is done a lot and the warnings are turned on again, one would not know, which functions are and which functions are not implemented. > >   > > Generally, you also should describe, why it is such a bad thing, if the linker finds out that symbols are missing. If it is just the error message, which often does not refer well to the line of code calling the function, perhaps that can be changed. > >   > >   > > > >  -----Ursprüngliche Nachricht----- > > Von: Hans Åberg via Std-Proposals <std-proposals_at_[hidden]> > > It means that it is not implemented but is called for by a specification such as the C++ standard. > > > > If you call such a function, you get a compiler diagnostic saying that it is not implemented. That is the first part. > > > > The second part is the ability to implement it on your own. This part is tricky, and it is unclear if it can be admitted. -- > > Std-Proposals mailing list > > Std-Proposals_at_[hidden] > > https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals > > > -- > Std-Proposals mailing list > Std-Proposals_at_[hidden] > https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals > -- > Std-Proposals mailing list > Std-Proposals_at_[hidden] > https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-03-20 18:13:38