openexr-devel
[Top][All Lists]
Advanced

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

Re: [Openexr-devel] C++11, 'throw', etc.


From: Werner Benger
Subject: Re: [Openexr-devel] C++11, 'throw', etc.
Date: Thu, 10 Aug 2017 08:38:07 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

It should be noted that dynamic expressions are actually forbidden in C++17, so OpenEXR does no longer compile with GCC 7.1 when std C++17 is enabled. The highest C++ version that can be used to compile it is C++14, where it's still just a warning, while in C++17 it's an error. It would be good to have OpenEXR at least compilable in C++17. Major C++ libraries such as QT are using C++11 nowadays, so it seems pretty safe to go beyond C++03 for modern applications, a lot of things are indeed much easier.

     Werner


On 10.08.2017 00:20, Larry Gritz wrote:
In a test compile with gcc 7, I get lots of errors of the following ilk:

/home/travis/build/lgritz/openexr/IlmBase/Imath/ImathVec.h:228:34: warning: 
dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
      const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                   ^~~~~

I can disable this particular warning, of course, but it's worth noting that 
the OpenEXR code base is not C++11 compliant. But in addition to using some 
C++03 idioms that are deprecated in C++11, perhaps more importantly, the code 
is not taking advantage of new features such as move semantics, constexpr, 
nothrow, and others. For the Imath classes especially, using some of these may 
actually confer a performance benefit.

I feel kind of bad pointing this out while not really having the time at the 
moment to code up and submit an actual patch myself, but I thought I'd at least 
open the topic and see where the community stands on the issue of how and when 
to upgrade to C++11 and if it's important for modern OpenEXR to continue to 
support C++03. For point of reference, the VFX Reference Platform 
[http://www.vfxplatform.com/] dictated C++11 for 2016 and 2017, and will be 
C++14 for 2018.

        -- lg

--
Larry Gritz
address@hidden





_______________________________________________
Openexr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/openexr-devel

--
___________________________________________________________________________
Dr. Werner Benger                Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019  Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809                        Fax.: +1 225 578-5362




reply via email to

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