Mickey Rose
Mickey Rose
> If a, b, c are std::vector for instance, or any other standard container, this will always work fine, and it is required to by the standard. If a, b,...
> So, when we try to resurrect the moved-from a in the above code, what it will do is, interpret the storage as recursive_wrapper, then fetch the pointer from there...
I decided to turn this PR into an actual fix for the issue demonstrated by the added benchmark. Rather than going the "make `recursive_wrapper` a `unique_ptr` with copy" route, I...
> In current code, the last three lines of code ... ... destroy the target first, then move-construct a new string. https://github.com/mapbox/variant/blob/d2588a8f1d6b5d480d228e6d8a906ce634bdea9a/include/mapbox/variant.hpp#L629 After this PR, they receive an already-destroyed target,...
edit 2: amended for forwarding, is it correct now? If `has_type` then: ``` c++ noexcept(std::is_nothrow_constructible< typename std::remove_reference::type, T&& >::value) ``` If it needs conversion, then perhaps be something like: ```...
That's what I said, if `has_type` then `target_type==T` else `target_type==convertible_type_noref::type`
Ok, but I'll probably need some help understanding where `std::remove_reference` should be applied and where not. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0086r0.pdf > `variant` > References are supported as alternative types. Assignment to > such...
> We should only keep it on (or add it to) functions where it is a) obviously correct and b) any implementation change we might do in the future will...
Notes added to https://github.com/lightmare/variant/commit/244c3b7f0c3c80c805a68b3c806b05781e9d4457
Can you please provide a small [test case](https://github.com/mapnik/mapnik/wiki/A-perfect-testcase)? At least mapnik xml style and a small image showing wrong rendering.