Posts by Cássio Renan • 233 points
5 posts
-
3
votes2
answers1385
viewsA: When to use "inline"?
The response of Maniero is, as always, excellent, but there is another semantic aspect of using inline which is less known. The attribute inline causes a relaxation of the restrictions imposed by…
-
2
votes4
answers12732
viewsA: Multiple return in C/C++
C++17 introduced us to the wonderful world of Structured Links (Structured Bindings). This new Feature allows you to return a tuple (or an object that behaves like one), and use a small syntactic…
-
3
votes5
answers453
viewsA: Is it legal to delete this in a member function?
Yes, it’s cool (for objects created with new) For the purposes of this answer, I am using the same draft used in that reply. It’s a rather old draft, but the question is about c++11, after all. The…
-
0
votes1
answer161
viewsA: How to mount Operator == from a struct?
You return true when the objects are equal... bool operator==(const ARCO_TEMPO& obj1, const ARCO_TEMPO& obj2) { if (obj1.slotTimeU == obj2.slotTimeU && obj1.slotTimeV ==…
-
2
votes1
answer130
viewsA: C++ program stops responding when calling a function a second time
The question has already been answered in the comments, but only to contextualize a little: Behavior Indefinite You just came across a Behavior Indefinite. This type of behavior occurs when the…
c++answered Cássio Renan 233