Undoc'd Feature?
|
07-31-2022, 01:29 AM
(This post was last modified: 07-31-2022 02:17 AM by jte.)
Post: #40
|
|||
|
|||
RE: Undoc'd Feature?
(07-09-2022 05:15 AM)Wes Loewer Wrote:(07-08-2022 08:32 PM)jte Wrote: … as C++17 introduces additional sequencing constraints involving assignment operators. After reading this, I was meaning to reply, but wanted to first try your code out with a Microsoft compiler myself. While I have been plugging away at some C++ code, that’s been with a Mac here; I have another machine here, running Windows, that has Microsoft compilers installed, but it’s been warm enough [and I've been busy enough…] that I’ve not wanted to boot up multiple heat-spewing desktops simultaneously. (For the past week I’ve also been wearing 95PFE masks almost all the time [just not when eating or brushing teeth…] as a family member has tested positive for covid [but has had only mild symptoms], which certainly doesn’t lessen my perception of the summer heat. [Before this, I assumed the current variants are contagious enough that preventing spread between people living in the same home, sharing a bathroom, etc. was essentially impossible — even with masks etc., but so far I’ve tested negative each day. I had some scientific curiosity as to what would unfold if we maximized mask wearing, and also had some concerns over the uncertainty of “long covid”, so decided to try wearing masks as much as possible.]) To try out some compilations, I placed your sample code into a function, as follows: Code: int Wes(int a) When I try that function out with MSVC++ v14.28 / 1928 (x64), optimizations on, I get the following: Code: int Wes(int) PROC But, if I add “/std:c++17” as a command-line option, I instead get the following: Code: int Wes(int) PROC So it seems that conformance with this part of the C++17 language does depend on the options given to the Microsoft compiler that I tried. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)