Deutsch English Français Italiano |
<v4rpsp$1alv6$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams <thiago.adams@gmail.com> Newsgroups: comp.lang.c Subject: Re: C23 enums Date: Tue, 18 Jun 2024 08:09:13 -0300 Organization: A noiseless patient Spider Lines: 21 Message-ID: <v4rpsp$1alv6$1@dont-email.me> References: <v4jlfs$3d46g$1@dont-email.me> <v4rbaa$17q05$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 18 Jun 2024 13:09:14 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2dd0a2640e5ea796012e3f14c52580f6"; logging-data="1398758"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nIIHceiMCwgNzTMK/WsBwzNq+IHJ5N+E=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:vxbrRui0mu/o530dsQ+3mxyVNfw= Content-Language: en-US In-Reply-To: <v4rbaa$17q05$1@dont-email.me> Bytes: 1507 On 18/06/2024 04:00, Lawrence D'Oliveiro wrote: > On Sat, 15 Jun 2024 06:04:58 -0300, Thiago Adams wrote: > >> I realized we can have "private" enums in C23, because they are >> completed types. Values of E does not need to be at header file. >> >> enum E : int; >> >> struct X{ >> enum E e; >> }; > > What would be the point of this? This creates a kind of encapsulation. Including the header file will not include the values and consequently the usage of e is discouraged.