Getting in trouble with mixed construction -- Barry Revzin

How do I construct thee? Let me count the ways...

Getting in trouble with mixed construction

by Barry Revzin

From the article:

Several years ago, I wrote a post about the complexities of implementing comparison operators for optional<T>Getting in trouble with mixed comparisons. That post was all about how, even just for ==, making a few seemingly straightforward decisions leads to an ambiguity that different libraries handle differently.

Now is a good time to circle back to that same idea, except this time instead of talking about equality comparison, we’re just going to talk about construction. This post is going to work through a bunch of cases of trying to construct an object of type X from an object of type Y...


Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.