$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [TypeErasure] efficiency problem
From: Mikhail Strelnikov (mikhail.strelnikov_at_[hidden])
Date: 2017-03-23 05:55:15
Hello!
In following code TypeErasure creates two copies of s, while Boost.Any
creates no copies at all.
any x{ s{} };
any y{ std::move(x) };
any z;
z = std::move(y);
There is move constructor for type_erasure::any, but it does allocate
memory and calls copy constructor for s. Why?
And why there is no move assignment operator in type_erasure::any?
Thanks.
Full source: https://wandbox.org/permlink/iHs5a0bjzXsBtpwC