Niels Dekker

Results 415 comments of Niels Dekker

Could the word "references" be removed from this specific sentence: > [...] two or three words (doubles, pointers, references) are usually best passed by value. Otherwise, is the intention to...

> I think thats about a struct that has a reference as a member Thanks @MikeGitb I guess you're right. Maybe the sentence could be clarified by adding the word...

Thanks again, so what do you think of the following adjustment? > What is “cheap to copy” depends on the machine architecture, but an argument of a fundamental type, an...

Do I understand correctly that all fundamental types are considered "cheap to copy"? If so, could this be mentioned explicitly, directly after the line, _"What is "cheap to copy" depends..."_?...

Just for my understanding, do I understand correctly that this pull request favors bit_cast over reinterpret_cast in _any_ _possible_ case? Including the cases depicted by three code examples below here?...

> > `auto ptr2 = std::bit_cast(address); // Favorable?` > > This might be il-formed because `sizeof(void*) == sizeof(uintptr_t)` is not necessarily true, and even if it compiles, it might give...

@jwakely Thanks again, Jonathan. So do you have a suggestion how the core guideline on reinterpret_cast versus bit_cast should be like? Apparently it isn't simply "Favor bit_cast over reinterpret_cast"!

@jwakely Can you please confirm that the line of code that does a `reinterpret_cast` in the following example has undefined behavior? void f( uint32_t u ) { int i1 =...

> For two's complement integers the implicit conversion from `uint32_t` to `int32_t` preserves the original bit pattern, and C++ now requires two's complement integers @jwakely Ah, thanks Jonathan. I see...

Thanks for your comment @stefanklein Honestly I'm not opposed to a text format, but then I think a tab separated format would still be easier to parse than the old...