12,981 reputation
11948
bio website
location
age
visits member for 3 years, 1 month
seen 2 days ago

Nov
26
comment Documenting the effect of std::move
That requires changing the signature of Other. Yes, the signature should be changed, but it is important to mention it.
Nov
26
comment Documenting the effect of std::move
@Eugene: Your note is good in that it shows the problem already existed before move semantics. Moving from the object adds another way to screw it, but other ways existed before.
Nov
26
revised Documenting the effect of std::move
extend with general talk about modifying arguments
Nov
26
comment Documenting the effect of std::move
@Eugene: Well, a function taking non-const l-value reference is a rather strong code smell. Methods are generally expected to modify their invocant, but functions shouldn't modify their arguments. Especially in C++11 where move makes the more readable approach almost as efficient.
Nov
25
revised Documenting the effect of std::move
added 247 characters in body
Nov
25
comment Documenting the effect of std::move
@James: That's something to avoid, not document.
Nov
25
comment Application qos involving priority and bandwidth
I don't see anything that wouldn't be already solved by existing priority queue variants. Would you please explain why priority queue, hierarchical token bucket or other queueing disciplines provided by Linux don't suit you?
Nov
25
answered Application qos involving priority and bandwidth
Nov
25
answered Documenting the effect of std::move
Nov
20
revised Strategy for code review before merge to master from feature branches
mention that merged changes must not be rewound
Nov
20
comment Strategy for code review before merge to master from feature branches
@sixtyfootersdude: Git developers do this all the time with branches they shared already. As long as everybody expects the branch to be rewound, it is OK. But you have to be careful not to rewind anything merged to master or any other branch where rewind is not expected.
Nov
19
comment Language with syntactic sugar that translates to C++ that looks “hand-written”
Eliminating headers is planned for C++1y. But until then the preprocessor is simply too powerful for it's own good. You have to learn to deal with it and to that end you have to write it by hand. Even if modules make it to standard in 2017 they will take many more years to actually get implemented in all important platforms.
Nov
13
comment Finish feature reverted commits from develop
The 3-way merge algorithm is very straightforward. It compares the versions being merged with the most recent common ancestor and takes the modified version (if both are modified in the same part, it's a conflict). It works well, but if a merge is done not following the algorithm (e.g. by sloppy conflict resolution), the changes thus introduced will be carried to future merges. I am sure the reason could be found by inspecting the history, but there is no obvious general answer. Inspecting git log --left-right --boundary L...R for L and R being the commits merged would be a start.
Nov
13
comment Finish feature reverted commits from develop
A branch in another repository is always a different branch. So as long as you don't merge in the central repository (which you usually can't because it is bare), you always have a temporary branch.
Nov
11
revised Writing generic code when your target is a C compiler
added 673 characters in body
Nov
11
answered Writing generic code when your target is a C compiler
Nov
11
comment Unit testing to prove balanced tree
The appropriate invariant of red-black tree is "Every path from a given node to any of its descendant leaves contains the same number of black nodes." And only that many red nodes, because red node may only have black children.
Nov
8
comment Side effect-free interface on top of a stateful library
Well, if the state exists, it won't go away. The trick is to create something that will keep track of the dependency. The standard Haskell answer is "monads" or the more advanced "arrows". They are a bit hard to wrap your head around and I never really did, so somebody else would have to try explaining them.
Oct
24
revised What's is the point of PImpl pattern while we can use interface for the same purpose in C++?
added 80 characters in body
Oct
24
comment What's is the point of PImpl pattern while we can use interface for the same purpose in C++?
@ThomasEding: Difference between P1 and I1 is, that is pimpl case the wrapper method in the public class is non-virtual (and adding even virtual method on the pimpl itself is ok; it's not part of the ABI), while all public methods of an interface are virtual (that's a definition of interface) and those can't be added without breaking the ABI. You are right about P2.