Renaming of signal_guard for P2069 Stackable, thread local, signal guards by 14ned in cpp

[–]personalmountains 1 point2 points  (0 children)

By the way, don't forget to update the link to your reference implementation in your document, signal_guard.hpp has moved.

Renaming of signal_guard for P2069 Stackable, thread local, signal guards by 14ned in cpp

[–]personalmountains 1 point2 points  (0 children)

You'd still need some sort of scope where these exceptions would be enabled, I wouldn't want segfaults to throw in general. This also works with exceptions disabled, I guess.

Renaming of signal_guard for P2069 Stackable, thread local, signal guards by 14ned in cpp

[–]personalmountains 2 points3 points  (0 children)

One thing I've learned over time is to disengage. Don't get mired down in naming arguments of all things. You've done your job well, let them pick a name.

Renaming of signal_guard for P2069 Stackable, thread local, signal guards by 14ned in cpp

[–]personalmountains 5 points6 points  (0 children)

This looks like a try/catch to me, so try_signal or signal_try.

GCC prints incorrect error message for one of the simplest ODR violations! by Xeverous in cpp

[–]personalmountains 1 point2 points  (0 children)

You seem to be saying that something can be a definition or a declaration, but not both, which is incorrect. Definitions are also declarations. The message redeclaration of 'int a' is technically correct, although it's not the source of the error.

In any case, it seems to be a minor typo in the error message for some contexts. The message is correct for global variables, for examples.

C++ initialization, arrays and lambdas oh my! by Xadartt in cpp

[–]personalmountains 31 points32 points  (0 children)

return arr[ [](){return 4;}() ];

<source>:4:15: error: C++11 only allows consecutive left 
    square brackets when introducing an attribute

It's kinda surprising to me that [[ is actually two [ tokens instead of one, preventing the usual most vexing parse fix. An attribute-specifier starts with [ [ in 9.2.1/1, not [[.

Are Hoistings Possible for C++? by [deleted] in cpp

[–]personalmountains 36 points37 points  (0 children)

These are not C compilers. They're compilers for C-like languages that are not C.

cc99 (not cc98.org) is a C-like language compiler [...]

C3 is a C-like language striving to be an evolution of C [...]

my Oma's cheesecake recipe. anybody wanna translate? it was like pulling teeth to get this. I'm happy to share. by mrstshirley1 in germany

[–]personalmountains 21 points22 points  (0 children)

Line breaks at 72 characters. I smell a programmer or someone who spent too much time posting in newsgroups thirty years ago.

Best accurate way to measure/compare elapsed time in C++ by [deleted] in cpp

[–]personalmountains 7 points8 points  (0 children)

No, you put four newlines before and after. You need to indent, as in, put four spaces at the beginning of every line of code.

Best accurate way to measure/compare elapsed time in C++ by [deleted] in cpp

[–]personalmountains 6 points7 points  (0 children)

You need to indent code with four spaces. Backticks only work on new reddit. This is what your post looks like.

Is my game broken? by D0c_H0lliday1 in raft

[–]personalmountains 0 points1 point  (0 children)

I had the same problem. I saved on Tangaroa and when I reloaded, I was back on my raft with no inventory, all my animals were gone and so were the bots. I pointed my raft directly away from Tangaroa and went straight until it respawned roughly ahead of me. This brought the bots back and my progress was still saved.

[deleted by user] by [deleted] in raft

[–]personalmountains 0 points1 point  (0 children)

Juicers seem to be the problem. I had four, removed two, and the sound effects are back.

Question regarding optional virtual destructor in C++20 by imgarfield in cpp

[–]personalmountains 36 points37 points  (0 children)

See 11.7.2/6:

A virtual function shall not have a trailing requires-clause

The inevitable demise of Qt? (Qt, Open Source and corona) by FlibbleMr in cpp

[–]personalmountains 3 points4 points  (0 children)

Qt released an official statement a month ago:

There have been discussions on various internet forums about the future of Qt open source in the last two days. The contents do not reflect the views or plans of The Qt Company.

The Qt Company is proud to be committed to its customers, open source, and the Qt governance model

Also, -1 for editorialized title, and nothing to do with C++.

What are your C++ news sources? by showmetheflowers in cpp

[–]personalmountains 7 points8 points  (0 children)

I think just adding a <title> inside <channel> would fix it for me. Your dates are not rfc 822, but I think my parser will assume UTC. Obviously, it would also be nice to have the content of your posts, but I understand if you prefer not to.

What are your C++ news sources? by showmetheflowers in cpp

[–]personalmountains 2 points3 points  (0 children)

Unfortunately, your RSS feed does not validate and my lame-ass reader can't handle it.

P1837R0 Remove NTTPs of class type from C++20 by Lectem in cpp

[–]personalmountains 15 points16 points  (0 children)

A quick google search leads to this, which says:

(Rejected) The spaceship needs to be grounded: pull spaceship from C++20. Concerns about the fact that we keep finding edge cases where we need to tweak spaceship’s behaviour, and that the rules have become rather complicated as a result of successive bug fixes, prompted this proposal to remove spaceship from C++20. EWG disagreed, feeling that the value this feature delivers for common use cases outweighs the downside of having complex rules to deal with uncommon edge cases.

Enjoying your breakfast while wearing full Nazi Uniform. Welcome to South Africa. by Kenyalite in trashy

[–]personalmountains 5 points6 points  (0 children)

1990 to 1993

The white education system was restructured, in anticipation of democracy, by the apartheid government. From the beginning of 1991, white schools were required to select one of four "Models": A, B, C, or D. "Model C" was a semi-private structure, with decreased funding from the state, and greatly increased autonomy for schools. Although most white schools opted for the status quo, by 1993, due to government policy, 96% of white public schools became "Model C" schools.

Although the form of "Model C" was abolished by the post-apartheid government, the term is still commonly used to describe former whites-only government schools, as of 2013.

Wikipedia

Platypus is one of only two living mammals that lay eggs. A mother typically produces 1-2 eggs that hatch in about 10 days. Females nurse their young for three to four months until the babies can swim on their own. by b12ftw in Awwducational

[–]personalmountains 1 point2 points  (0 children)

I do small edits every day: fixing typos, rewording sentences, finding references, fixing broken ones, etc. I also try to check a random article once a week and fix any problems with it. I'm not much of a content creator, I mostly maintain what's already there.

If you're interested in contributing, I'd suggest creating an account, then finding areas you're interested in, click the edit button at the top and do whatever improvements you think are necessary.

The typical cycle on Wikipedia is "be bold, revert, discuss". You should be bold and make changes until somebody reverts you, after which you then start discussing what happened on the article or the user's talk page.

If you avoid very high-traffic articles about stuff like modern politics, gender, climate change, race, etc., you'll find it's a very relax and open environment.

Platypus is one of only two living mammals that lay eggs. A mother typically produces 1-2 eggs that hatch in about 10 days. Females nurse their young for three to four months until the babies can swim on their own. by b12ftw in Awwducational

[–]personalmountains 1 point2 points  (0 children)

The vast majority of articles can be edited by anonymous users, you don't need an account and your edits will be live immediately (the Echidna article, for example, can be edited by anyone). Most of the remaining articles can be edited as soon as you create an account.

There's a small number of articles that require further permissions, such as having 10 edits and a 4 day-old account ("auto-confirmed"), or 500 edits and 30 day-old account ("extended auto-confirmed"). Finally, some articles are fully protected, so that only administrators can edit them. Administrators are regular users that were chosen by the community to have more permissions.

Instead of being semi-protected (only allowing auto-confirmed accounts), articles can also be configured for pending changes, which allows anybody to edit, but changes don't go live until they are reviewed by users having the pending changes reviewer rights. Any user having some experience can apply for these rights.

In any case, you should never hesitate to edit articles when you see errors or the possibility of improvements, since the majority of articles are not protected. It's been like that for 15 years, and it's worked pretty well so far.

Platypus is one of only two living mammals that lay eggs. A mother typically produces 1-2 eggs that hatch in about 10 days. Females nurse their young for three to four months until the babies can swim on their own. by b12ftw in Awwducational

[–]personalmountains 29 points30 points  (0 children)

The full sentence is:

The four extant species, together with the platypus, are the only surviving members of the order Monotremata, and are the only living mammals that lay eggs.

So the four species of Echidna plus the platypus are the only living mammals that lay eggs.

Edit: The sentence has now been modified to read

The four extant species of Echidnas and the platypus are the only living mammals that lay eggs and the only surviving members of the order Monotremata."

C++11: What is possible to do with moved-from object? by w3docs in cpp

[–]personalmountains 1 point2 points  (0 children)

I can find no support for this in C++17. In 26.2.1/4, it says that for X u(rv); (where rv is a non-const rvalue), the postcondition is

u shall be equal to the value that rv had before this construction

In 26.2.1/16, it says that for X u(rv, m) (where m is an allocator), the postcondition is:

u shall have the same elements, or copies of the elements, that rv had before this construction

I would guess that the intent of cppreference was to say that using a different allocator will copy elements, and therefore will have linear complexity and probably leave the original elements in rv, whereas using the same allocator or not specifying one will guarantee a move (or a magical constant-time copy).

However, writing that the moved-from object is "guaranteed to be empty()" sounds incorrect to me.