octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Will version 4.2 require C++11?


From: John W. Eaton
Subject: Re: Will version 4.2 require C++11?
Date: Fri, 20 May 2016 16:20:20 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 05/20/2016 12:45 PM, Rik wrote:
5/20/16

jwe,

I notice that the 'auto' keyword is now used in 5 places in liboctave:

system/lo-sysdep.h:const auto octave_getcwd = octave::sys::getcwd;
system/lo-sysdep.h:const auto octave_chdir = octave::sys::chdir;
system/lo-sysdep.h:const auto octave_popen2 = octave::sys::popen2;
util/oct-glob.h:const auto octave_fnmatch = octave::sys::fnmatch;
util/oct-glob.h:const auto octave_glob = octave::sys::glob;

That keyword is a C++11 feature.  Are we going to move to require that
feature level for the development branch?

I still think that it makes sense to use some restraint with C++11 features, but I'm OK with using auto for things like this.

OTOH, using auto to make aliases won't work for overloaded function names. In those cases I just used inline wrapper functions. If there is some problem with auto then we could always just use inline wrappers for these cases as well.

We are already using unique_ptr unconditionally and I haven't seen a lot of complaints about that. So my guess is that C++11 is not causing a lot of trouble.

jwe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]