Le 02/10/2020 à 19:11, Richard Kimberly Heck a écrit :
On 10/2/20 12:29 PM, Jean-Marc Lasgouttes wrote:
/// Does an optional argument follow after the current token?
- bool hasOpt(std::string const l = "[");
+ bool hasOpt(std::string const & l = "[");
I am a bit surprised that this is allowed---it looks like a reference to
a temporary value---but apparently it is. I guess the temporary is in
scope throughout the function body. Apparently this is NOT ok without
the 'const', though.
Yes, we have a lot of these, actually.
JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel