eggs-cpp / variant

Eggs.Variant is a C++11/14/17 generic, type-safe, discriminated union.
http://eggs-cpp.github.io/variant/
Boost Software License 1.0
138 stars 27 forks source link

Possible infinite recursion on asignment descrption #7

Closed viboes closed 9 years ago

viboes commented 9 years ago

In

constexpr variant& operator=(variant const& rhs);

description, doesn't "otherwise, calls *this = {}" recurse?

The same applies to the move assignment.

K-ballo commented 9 years ago

doesn't "otherwise, calls *this = {}" recurse?

It does (calls move assignment op, recursively). This used to be defined as *this = nullvariant, and got ruined when I removed nullvariant altogether. Will revise.

K-ballo commented 9 years ago

Fixed by 992d696797becd4ff151ff34be6e7c0a203e661f

viboes commented 9 years ago

Thanks.