Deutsch English Français Italiano |
<v2q9fk$2cb7s$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: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions Date: Fri, 24 May 2024 16:50:28 +0200 Organization: A noiseless patient Spider Lines: 42 Message-ID: <v2q9fk$2cb7s$1@dont-email.me> References: <v2l828$18v7f$1@dont-email.me> <v2lnr5$1bu1r$1@dont-email.me> <v2ngmp$1p3o2$3@dont-email.me> <v2oi32$1vebu$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 24 May 2024 16:50:28 +0200 (CEST) Injection-Info: dont-email.me; posting-host="aa31083d92649562fe347cd52a2a5ec5"; logging-data="2501884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199p8kYOslwz6oMj656wla0RmiGBLlYjIc=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:qWfvKdIdSTG15ayEz92U94GoDas= In-Reply-To: <v2oi32$1vebu$1@dont-email.me> Content-Language: en-GB Bytes: 2886 On 24/05/2024 01:05, Chris M. Thomasson wrote: > On 5/23/2024 6:35 AM, David Brown wrote: >> On 22/05/2024 23:24, Chris M. Thomasson wrote: >>> On 5/22/2024 9:55 AM, David Brown wrote: >>>> In an attempt to bring some topicality to the group, has anyone >>>> started using, or considering, C23 ? There's quite a lot of change >>>> in it, especially compared to the minor changes in C17. >>> >>> Love the way std::vectors respect alignas... C++20, iirc? >>> >>> [...] >> >> I have no idea what you are talking about. > > std::vector actually respects alignas, on MSVC at least. I did not know > this worked until I tried it. Iirc, Bonita was the one that sparked my > test. It aligned itself on the proper boundaries. Very nice. > >> But did you notice that this is c.l.c, not c.l.c++, and the topic is >> C23, not C++23 ? Discussing comparisons or compatibility with C++ is >> fair enough, but talking about pure C++ matters (such as >> std::vector<>) is unlikely to be helpful. > > C has it as well... Very useful! I know C has alignas (now as a keyword in C23, instead of just _Alignas from C11). I know C++ has alignas (from C++11 onwards). What I don't understand is why you think std::vector<> "respects alignas" in C++20 - alignment for std::vector<> works like alignment for any other class in C++, and always has done. And what I /really/ don't understand is why you think it is remotely relevant here? Even "alignas" in C is not particular relevant to this thread, except that it has become a keyword in C23 instead of a macro defined to _Alignas in <stdalign.h>. Perhaps I should just be grateful for the small mercy of there being no random youtube link in your post.