- "Trip report: Summer 2021 ISO C++ standards meeting (virtual)" by Herb Sutter - 1 Update
- Google Groups (was Re: differential reference counting...) - 5 Updates
- Windows-API- / lambda- / TLS-trick - 3 Updates
- concepts question - 6 Updates
| Lynn McGuire <lynnmcguire5@gmail.com>: Jun 09 06:22PM -0500 "Trip report: Summer 2021 ISO C++ standards meeting (virtual)" by Herb Sutter https://herbsutter.com/2021/06/09/trip-report-summer-2021-iso-c-standards-meeting-virtual/ "On Monday, the ISO C++ committee held its third full-committee (plenary) meeting of the pandemic and adopted a few more features and improvements for draft C++23." "The next tentatively planned ISO C++ face-to-face meeting is February 2022 in Portland, OR, USA. (Per our C++23 schedule, https://wg21.link/p1000 this is the "feature freeze" deadline for design-approving new features targeting the C++23 standard, whether the meeting is physical or virtual.) Meeting in person next February continues to look promising – barring unexpected surprises, it's possible that by that time most ISO C++ participating nations will have been able to resume local sports/theatre/concert events with normal audiences, and removed travel restrictions among each other, so that people from most nations will be able to participate at an in-person meeting. But we still have to wait and see… we likely won't know for sure until well into the autumn, and so we're still calling this one "tentative" for now. You can find a list of our meeting plans on the Upcoming Meetings page." https://isocpp.org/std/meetings-and-participation/upcoming-meetings Someone here was noting that there does not seem to be much happening with C++. Herb Sutter begs to differ ! The list looks fairly technical rather than broad scoping changes. Lynn |
| "Öö Tiib" <ootiib@hot.ee>: Jun 09 06:04AM -0700 On Thursday, 4 February 2021 at 00:35:25 UTC+2, Chris M. Thomasson wrote: > > Also see <https://lwn.net/Articles/827233/>, which seems to be from > > when comp.lang.lisp got the same treatment back in July. > DAMN! Seems that the idea that Google bans because of Skybuck Flying nonsense is wrong. It is more likely some kind of all caps nonsense generator written by pederasta pompinara italiano that seems to post from Google's accounts. |
| David Brown <david.brown@hesbynett.no>: Jun 09 05:55PM +0200 On 09/06/2021 15:04, Öö Tiib wrote: > nonsense is wrong. It is more likely some kind of all caps nonsense > generator written by pederasta pompinara italiano that seems to > post from Google's accounts. Both Skybuck and that weird Italian all-caps poster use google groups to send their messages. Google should just do as many regular Usenet users do - automatically kill any messages sent via google groups. The all-caps Italian posts have been coming a few times per year for as long as I can remember - why would that lead to a problem /now/ ? Skybuck's Covid conspiracy theories and assorted insanity, on the other hand, are precisely the kind of thing that gets people chucked off twatter, facebook, and other social media at the moment. (At least these have the wit to block the poster, not close off everyone who might have unwillingly have seen the message). (Yes, I know there are decent people who use gg to make decent posts too, and yes, I know there are good reasons why they might not be able to use a real newsserver on occasion.) |
| Real Troll <real.troll@trolls.com>: Jun 09 04:55PM On 09/06/2021 16:55, David Brown wrote: > Both Skybuck and that weird Italian all-caps poster use google groups to > send their messages. Google should just do as many regular Usenet users > do - automatically kill any messages sent via google groups. The Italian chap is attacking a prominent lawyer based in ITALY and the Lawyer must have complained about it. Also, AIOE have closed down one newsgroup about the same topic on the Italian Lawyer. AIOE is an Italian based Newsserver but they were forced to remove anything related to that Lawyer and so Paulo who runs that server decided to host it in Germany (but removed the newsgroup about that Lawyer because of EU cooperation and Germany is part of the EU) where laws are a bit relaxed about free speech. As far a SkyBuck is concerned, all media outlets have banned anything that questions the existence of Covid and challenges lockdowns. Aanother topic that was banned was "Donald Trump". I don't know whether the ban is still there or has it been relaxed. Youtube removed many videos supporting Trumps views! |
| "Öö Tiib" <ootiib@hot.ee>: Jun 09 12:23PM -0700 On Wednesday, 9 June 2021 at 19:58:49 UTC+3, Real Troll wrote: > Aanother topic that was banned was "Donald Trump". I don't know whether > the ban is still there or has it been relaxed. Youtube removed many > videos supporting Trumps views! Censoring Internet. :D Smells like North Korea. Did U.S. have Communist coup d'état ? |
| Real Troll <real.troll@trolls.com>: Jun 09 10:10PM +0100 On 09/06/2021 20:23, Öö Tiib wrote: > Censoring Internet. :D Smells like North Korea. Did U.S. have Communist > coup d'état ? Biden is in charge (he is a socialist). You can say Biden is a good president but you can't say Trump was a better president as he controlled migration at a time when crime rate in United States was going up. There is one African American saying that America is not a racist country. He said African Americans make 13% of the population but they commit 60% of the crime and those 13% are all not criminals. So you know statistically who commits more crime!!. You can't blame the police for profiling the criminals as they needs to target those who are likely to commit crime. I can post the video here but people may not like it so I won't. Political correctness has gone mad and lefties have taken control of this planet. Common Sense is no where to be seen these days. The WOKE brigade are in charge. Our BBC is now called "Black Broadcasting Corporation" and there are more programs about blacks then general entertaining programs. I have cancelled my license and now I use my TV as my PC monitor. I watch only YouTube where I get American TV News programs. |
| Bonita Montero <Bonita.Montero@gmail.com>: Jun 09 08:03PM +0200 With Windows there are several APIs to enumerate items of whatever and you've to supply a pointer to a callback which is called for each enumerated item. Mostly you can also supply a context-variable so that you won't have to communicate with global variables (often in newer ***Ex()-variants). If you have a function which hasn't a context-variant I've found a nice trick with a lambda and thread -local-storage to prevent a global function and a global variable. Here's an example: #include <Windows.h> #include <iostream> #include <vector> using namespace std; int main() { thread_local vector<string> *pDateFormats; thread_local bool memErr; auto enumDateFormatsProc = []( LPSTR lpDateFormatString ) -> BOOL { try { pDateFormats->emplace_back( lpDateFormatString ); return TRUE; } catch( ... ) { memErr = true; return FALSE; } }; vector<string> dateFormats; pDateFormats = &dateFormats; memErr = false; EnumDateFormatsA( enumDateFormatsProc, LOCALE_USER_DEFAULT, DATE_LONGDATE ); if( !memErr ) for( string &df : dateFormats ) cout << df << endl; } The lambda must be convertible to a function-pointer, so it can't have any captures. And even it hasn't the proper calling-convention, there's an implcit compilation of the callig-operator for the calling convention of the enumeration-function. Being convertible to a normal function-pointer reduces disables any possibilities for capturing outer variables. But a lambda cann still access any static or thread-local variables. I didn't make the vector itself thread-local because the associated memory could stay resident when an error occurs; so the thread-local storage is just a pointer to the vector and a memory-error-flag. |
| Bonita Montero <Bonita.Montero@gmail.com>: Jun 09 08:04PM +0200 Of course there's EnumDateFormatsEx, but I just wanted to give an example. |
| "Alf P. Steinbach" <alf.p.steinbach@gmail.com>: Jun 09 09:19PM +0200 On 9 Jun 2021 20:03, Bonita Montero wrote: > And even [if the lambda] hasn't the proper calling-convention, > there's an implcit compilation of the callig-operator for the calling > convention of the enumeration-function. Well, there's no such guarantee in the standard. Visual C++ overloads the function call operator of a lambda object and that causes some bugs with respect to conversions. One I reported got fixed. Others remain, AFAIK. But for 64-bit Windows programming you should be safe: 1 calling convention to rule them all. - Alf |
| Bonita Montero <Bonita.Montero@gmail.com>: Jun 09 05:26PM +0200 If you have a class / struct with a template-parameter that is specified to have a concept-constraint with requires - why it is necessary to re-define this dependency in the external definition of all members ? Is there a deeper necessity in this ? template<typename T> requires regular<T> struct S { void f(); // ... }; template<typename T> requires regular<T> // why is this duplicate check necessary void S<T>::f() { // ... } |
| David Brown <david.brown@hesbynett.no>: Jun 09 05:47PM +0200 On 09/06/2021 17:26, Bonita Montero wrote: > { > // ... > } Are you sure it /is/ necessary? What sort of error message are you getting from your compiler (and what compiler is it) ? <https://godbolt.org> testing is always useful for that kind of thing. "requires" adds restrictions on how a template can be used, thus giving clearer error messages at an earlier stage. I don't see why they would be needed in the implementation of a function if they are given in the declaration. |
| Bonita Montero <Bonita.Montero@gmail.com>: Jun 09 06:10PM +0200 Am 09.06.2021 um 17:47 schrieb David Brown: > clearer error messages at an earlier stage. I don't see why they would > be needed in the implementation of a function if they are given in the > declaration. If I omit the commented requires-clause with MSVC I get the error: error C3864: 'S<T>': requires clause is incompatible with the declaration With clang I get the error: error: requires clause differs in template redeclaration |
| David Brown <david.brown@hesbynett.no>: Jun 09 06:50PM +0200 On 09/06/2021 18:10, Bonita Montero wrote: > declaration > With clang I get the error: > error: requires clause differs in template redeclaration I just tried it on <https://godbolt.org>, with the code you gave and the two missing lines: #include <concepts> using namespace std; Current gcc and clang with "--std=c++20 -Wpedantic" are happy with it, as is MSVC v.19 with "/std:c++latest". Are you missing some compiler options, or using a different version? Again - go to <https://godbolt.org>, try it out on different compiler versions and you might get an idea of what is going on. |
| Bonita Montero <Bonita.Montero@gmail.com>: Jun 09 07:51PM +0200 > using namespace std; > Current gcc and clang with "--std=c++20 -Wpedantic" are happy with it, > as is MSVC v.19 with "/std:c++latest". clang 12 doesn't work: https://godbolt.org/z/jbzq8nP5G g++ 11 does work. -Wpedantic doesn't make a difference either. |
| David Brown <david.brown@hesbynett.no>: Jun 09 08:48PM +0200 On 09/06/2021 19:51, Bonita Montero wrote: > clang 12 doesn't work: https://godbolt.org/z/jbzq8nP5G > g++ 11 does work. > -Wpedantic doesn't make a difference either. You are right - somewhere between testing gcc (which does not complain) and clang and MSVC, I had managed to undo the comment marker I had in the second "requires". Sorry for the noise. It seems it is only gcc that is happy with your code. It looked fine to me, but I haven't studied the standards here. |
| You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment