[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: move constructors likely a requirement
From: |
Carlo De Falco |
Subject: |
Re: move constructors likely a requirement |
Date: |
Thu, 5 Sep 2019 16:35:13 +0000 |
> Il giorno 5 set 2019, alle ore 17:12, John W. Eaton <address@hidden> ha
> scritto:
>
> Thanks for the patch. In the meantime, I guessed and made this change:
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/d171d356767b
>
> Sorry for the extra work.
The warnings coming from -Wpessimizing-move are now gone.
I still see the following 14 instances of -Wreturn-std-move instead :
14 matches for "-Wreturn-std-move" in buffer: untitled
412:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
425:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
438:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
451:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
467:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
483:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
499:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
515:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
531:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
547:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
563:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
579:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
595:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
611:octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r'
will be copied despite being returned by name [-Wreturn-std-move]
the full warning messages look like this :
octave/libinterp/corefcn/tril.cc:122:14: warning: local variable 'r' will be
copied despite being returned by name [-Wreturn-std-move]
return r;
^
octave/libinterp/corefcn/tril.cc:173:41: note: in instantiation of function
template specialization 'do_triu<double>' requested here
return lower ? do_tril (a, k, pack) : do_triu (a, k, pack);
^
octave/libinterp/corefcn/tril.cc:221:18: note: in instantiation of function
template specialization 'do_trilu<double>' requested here
retval = do_trilu (arg.array_value (), k, lower, pack);
^
octave/libinterp/corefcn/tril.cc:122:14: note: call 'std::move' explicitly to
avoid copying
return r;
^
std::move(r)
c.
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/03
- Re: performance improvements, Rik, 2019/09/03
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/04
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/04
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/05
- Re: move constructors likely a requirement,
Carlo De Falco <=
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/05
- Re: move constructors likely a requirement, Carlo de Falco, 2019/09/05
- Re: move constructors likely a requirement, Carlo de Falco, 2019/09/05
- Re: move constructors likely a requirement, kingcrimson, 2019/09/06
- Re: move constructors likely a requirement, kingcrimson, 2019/09/06
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/06
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/05
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05