Date: Sun, 5 Nov 2023 11:25:14 +0000
A name marked as discouraged does not imply that it will be removed in the future, it is not a precursor to deprecated. And it conditionally generates a warning.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Andrey Semashev via Std-Proposals <std-proposals_at_[hidden]>
Sent: Sunday, November 5, 2023 19:18
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Andrey Semashev <andrey.semashev_at_[hidden]>
Subject: Re: [std-proposals] Keeping C++ Young: Migrating to Modern C++
On 11/5/23 14:11, Yexuan Xiao via Std-Proposals wrote:
> I propose a new standard attribute, [[discouraged]], and a new macro,
> #strict, to indicating that the name or entity declared with this
> attribute is discouraged from use, and giving an alternative.
>
> [[discouraged( string-literal )]]
> string-literal - an unevaluated string literal that could be used to
> explain the rationale for discouragement and to suggest a replacing entity
>
> macro #strict
> #strict can appear anywhere in the file, and once the file contains this
> macro, the compiler will generate warnings for all uses of names and
> syntax that are marked as discouraged, and give the reason.
>
> Full proposal written with bikeshed here:
> https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.csswg.org%2Fbikeshed%2F%3Furl%3Dhttps%3A%2F%2Fstorage.nykz.org%2Fproposals%2Fkeeping-cxx-young.bs%26force%3D1&data=05%7C01%7C%7Cfeeb6e510b0446d4ab3708dbddf0f760%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638347799252785276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O6FWAqbou7wxTn4RonkCwP4moduJuZllOOOwFX2kCVY%3D&reserved=0<https://api.csswg.org/bikeshed/?url=https://storage.nykz.org/proposals/keeping-cxx-young.bs&force=1> <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.csswg.org%2Fbikeshed%2F%3Furl%3Dhttps%3A%2F%2Fstorage.nykz.org%2Fproposals%2Fkeeping-cxx-young.bs%26force%3D1&data=05%7C01%7C%7Cfeeb6e510b0446d4ab3708dbddf0f760%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638347799252785276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O6FWAqbou7wxTn4RonkCwP4moduJuZllOOOwFX2kCVY%3D&reserved=0<https://api.csswg.org/bikeshed/?url=https://storage.nykz.org/proposals/keeping-cxx-young.bs&force=1>>.
How is it different from [[deprecated]]?
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Andrey Semashev via Std-Proposals <std-proposals_at_[hidden]>
Sent: Sunday, November 5, 2023 19:18
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Andrey Semashev <andrey.semashev_at_[hidden]>
Subject: Re: [std-proposals] Keeping C++ Young: Migrating to Modern C++
On 11/5/23 14:11, Yexuan Xiao via Std-Proposals wrote:
> I propose a new standard attribute, [[discouraged]], and a new macro,
> #strict, to indicating that the name or entity declared with this
> attribute is discouraged from use, and giving an alternative.
>
> [[discouraged( string-literal )]]
> string-literal - an unevaluated string literal that could be used to
> explain the rationale for discouragement and to suggest a replacing entity
>
> macro #strict
> #strict can appear anywhere in the file, and once the file contains this
> macro, the compiler will generate warnings for all uses of names and
> syntax that are marked as discouraged, and give the reason.
>
> Full proposal written with bikeshed here:
> https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.csswg.org%2Fbikeshed%2F%3Furl%3Dhttps%3A%2F%2Fstorage.nykz.org%2Fproposals%2Fkeeping-cxx-young.bs%26force%3D1&data=05%7C01%7C%7Cfeeb6e510b0446d4ab3708dbddf0f760%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638347799252785276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O6FWAqbou7wxTn4RonkCwP4moduJuZllOOOwFX2kCVY%3D&reserved=0<https://api.csswg.org/bikeshed/?url=https://storage.nykz.org/proposals/keeping-cxx-young.bs&force=1> <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.csswg.org%2Fbikeshed%2F%3Furl%3Dhttps%3A%2F%2Fstorage.nykz.org%2Fproposals%2Fkeeping-cxx-young.bs%26force%3D1&data=05%7C01%7C%7Cfeeb6e510b0446d4ab3708dbddf0f760%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638347799252785276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O6FWAqbou7wxTn4RonkCwP4moduJuZllOOOwFX2kCVY%3D&reserved=0<https://api.csswg.org/bikeshed/?url=https://storage.nykz.org/proposals/keeping-cxx-young.bs&force=1>>.
How is it different from [[deprecated]]?
-- Std-Proposals mailing list Std-Proposals_at_[hidden] https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fstd-proposals&data=05%7C01%7C%7Cfeeb6e510b0446d4ab3708dbddf0f760%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638347799252785276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RJsZGgHcQ4Np3B%2FWKQfVjNLQOvzLehP3QhodMdqcgJs%3D&reserved=0<https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals>
Received on 2023-11-05 11:25:19