On Tue, Jan 19, 2016 at 5:07 PM, Thiago Macieira <thiago.macie...@intel.com>
wrote:

>
> std::string someString()
> {
>         return constexpr_string("foo");
> }
>

 "constexpr_string" should very likely return a const std::string, so this
will copy and not move...


> std::string g_string;
> void f()
> {
>         // move-construction
>         static std::string s_string = someString();
>
>         // causes move-assignment operator to be called
>         g_string = someString();
> }


... otherwise, how is (for instance) g_string.begin() going to work since
it's noexcept?

Cheers,
-- 
Giuseppe D'Angelo
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to