Re: C++11, 'throw', etc.
Deke Kincaid <[email protected]> Thu, 10 Aug 2017 15:47:02 -0700
| Newsgroups | gmane.comp.video.openexr.devel |
|---|---|
| Message-ID | <CAOOm49RnN5b8WxzkHLxtDf4_AWG+DOCj1i1mTXyGAv+s1RSOeg@mail.gmail.com> |
--===============4937892323486411709== Content-Type: multipart/alternative; boundary="001a113dd9f6cfd82205566dfa0a" --001a113dd9f6cfd82205566dfa0a Content-Type: text/plain; charset="UTF-8" I don't think it would hurt. Everyone is mostly on 2.2 now. The only places I could see possible issues are places which are always really far behind and do not follow VFXPlatform, ie Adobe and any DI products such as Blackmagic Resolve, Scratch, Baselight where they care less about fitting into the pipeline. Though Adobe now includes Brent's ProEXR plugin so everything might be just fine. They were still on EXR 1.0 up until a year ago. On Thu, Aug 10, 2017 at 12:49 PM, Larry Gritz <[email protected]> wrote: > Do you think it's likely that any app that is farther behind is also > locked off on particular versions of external libraries like OpenEXR, so > would not be hurt by future releases of those libraries requiring C++11? > > > On Aug 10, 2017, at 12:41 PM, Deke Kincaid <[email protected]> wrote: > > Nuke 11, Maya 2017 and Houdini 16 or 16.5? (I forget which) are now C++11 > I believe. I think a few applications are still a bit behind (rv, Mari, > Katana) but there are plans for that to be rectified in the near-ish future. > > On Thu, Aug 10, 2017 at 11:52 AM, Piotr Stanczyk <[email protected] > > wrote: > >> Sounds like a sensible plan to me. >> >> Anyone from ILM care to comment on this? Can you foresee any internal >> build issues? >> >> Piotr >> >> On Thu, Aug 10, 2017 at 11:40 AM Larry Gritz <[email protected]> wrote: >> >>> Any vendors that have bought into VFX Platform (Autodesk, Foundry, SESI) >>> should in theory have been on C++11 since last year (and should be on board >>> for C++14 for any products coming in 2018). >>> >>> We're only talking about moving forward, so a stray downstream product >>> stuck on C++03 can keep using OpenEXR <= 2.2. >>> >>> I'll give it a couple days to see if there are objections before I do >>> any of the actual work. But it will be cleaner and easier if we can just >>> assume C++11 as a minimum. >>> >>> -- lg >>> >>> >>> On Aug 10, 2017, at 11:12 AM, Piotr Stanczyk <[email protected]> >>> wrote: >>> >>> Are there any vendors for whom this would cause an issue? Else, I would >>> vote for moving things forward >>> >>> >>> On 10 August 2017 at 10:18, Larry Gritz <[email protected]> wrote: >>> >>>> Ugh, so it's worse than I thought. >>>> >>>> I suppose I'm willing to fix and submit a patch to address this. >>>> >>>> Do I need to put in the proper macros to make it compile on everything >>>> from C++03 through 17? Does anybody want to argue for continuing to >>>> maintain C++03 compatibility for future OpenEXR releases, or is it finally >>>> time (six years after the C++ standard and 2+ years after VFXPlatform) to >>>> raise the floor to C++11? >>>> >>>> -- lg >>>> >>>> >>>> On Aug 9, 2017, at 11:38 PM, Werner Benger <[email protected]> wrote: >>>> >>>> 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 >>>> [email protected] >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Openexr-devel mailing list >>>> [email protected] >>>> 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 <(225)%20578-4809> Fax.: +1 >>>> 225 578-5362 <(225)%20578-5362> >>>> >>>> >>>> _______________________________________________ >>>> Openexr-devel mailing list >>>> [email protected] >>>> https://lists.nongnu.org/mailman/listinfo/openexr-devel >>>> >>>> >>>> -- >>>> Larry Gritz >>>> [email protected] >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Openexr-devel mailing list >>>> [email protected] >>>> https://lists.nongnu.org/mailman/listinfo/openexr-devel >>>> >>>> >>> >>> -- >>> Larry Gritz >>> [email protected] >>> >>> >>> >>> >>> >> _______________________________________________ >> Openexr-devel mailing list >> [email protected] >> https://lists.nongnu.org/mailman/listinfo/openexr-devel >> >> > _______________________________________________ > Openexr-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/openexr-devel > > > -- > Larry Gritz > [email protected] > > > > > --001a113dd9f6cfd82205566dfa0a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I don't think it would hurt.=C2=A0 Everyone is mostly = on 2.2 now.=C2=A0 <br><br>The only places I could see possible issues are p= laces which are always really far behind and do not follow VFXPlatform, ie = Adobe and any DI products such as Blackmagic Resolve, Scratch, Baselight wh= ere they care less about fitting into the pipeline.=C2=A0 <br><br>Though Ad= obe now includes Brent's ProEXR plugin so everything might be just fine= .=C2=A0 They were still on EXR 1.0 up until a year ago.<br></div><div class= =3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Aug 10, 2017 at 12:= 49 PM, Larry Gritz <span dir=3D"ltr"><<a href=3D"mailto:[email protected]= m" target=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote= class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli= d;padding-left:1ex"><div style=3D"word-wrap:break-word">Do you think it'= ;s likely that any app that is farther behind is also locked off on particu= lar versions of external libraries like OpenEXR, so would not be hurt by fu= ture releases of those libraries requiring C++11?<div><div class=3D"h5"><di= v><br><div><br><div><blockquote type=3D"cite"><div>On Aug 10, 2017, at 12:4= 1 PM, Deke Kincaid <<a href=3D"mailto:[email protected]" target=3D"_= blank">[email protected]</a>> wrote:</div><br class=3D"m_-3994852056= 49928793Apple-interchange-newline"><div><div dir=3D"ltr">Nuke 11, Maya 2017= and Houdini 16 or 16.5? (I forget which) are now C++11 I believe.=C2=A0 I = think a few applications are still a bit behind (rv, Mari, Katana) but ther= e are plans for that to be rectified in the near-ish future.<br></div><div = class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Aug 10, 2017 a= t 11:52 AM, Piotr Stanczyk <span dir=3D"ltr"><<a href=3D"mailto:piotr.st= [email protected]" target=3D"_blank">[email protected]</a>></span>= wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor= der-left:1px #ccc solid;padding-left:1ex"><div>Sounds like a sensible plan = to me.=C2=A0</div><div><br></div><div>Anyone from ILM care to comment on th= is? Can you foresee any internal build issues?</div><span class=3D"m_-39948= 5205649928793HOEnZb"><font color=3D"#888888"><div><br></div><div>Piotr</div= ></font></span><div class=3D"m_-399485205649928793HOEnZb"><div class=3D"m_-= 399485205649928793h5"><div><br><div class=3D"gmail_quote"><div>On Thu, Aug = 10, 2017 at 11:40 AM Larry Gritz <<a href=3D"mailto:[email protected]" t= arget=3D"_blank">[email protected]</a>> wrote:<br></div><blockquote clas= s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad= ding-left:1ex"><div style=3D"word-wrap:break-word">Any vendors that have bo= ught into VFX Platform (Autodesk, Foundry, SESI) should in theory have been= on C++11 since last year (and should be on board for C++14 for any product= s coming in 2018).<div><br></div><div>We're only talking about moving f= orward, so a stray downstream product stuck on C++03 can keep using OpenEXR= <=3D 2.2.</div><div><br></div><div>I'll give it a couple days to se= e if there are objections before I do any of the actual work. But it will b= e cleaner and easier if we can just assume C++11 as a minimum.</div><div><b= r></div><div><span class=3D"m_-399485205649928793m_7517529850997932784m_-60= 79636075028917681Apple-tab-span" style=3D"white-space:pre-wrap"> </span>-- = lg</div><div><br><div></div></div></div><div style=3D"word-wrap:break-word"= ><div><div><br><div><blockquote type=3D"cite"><div>On Aug 10, 2017, at 11:1= 2 AM, Piotr Stanczyk <<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>> wrote:</div><br class=3D"m_-39= 9485205649928793m_7517529850997932784m_-6079636075028917681Apple-interchang= e-newline"><div><div>Are there any vendors for whom this would cause an iss= ue? Else, I would vote for moving things forward=C2=A0<div><br></div></div>= <div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On 10 August 2017= at 10:18, Larry Gritz <span><<a href=3D"mailto:[email protected]" targe= t=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex"><div style=3D"word-wrap:break-word">Ugh, so it's worse th= an I thought.<div><br></div><div>I suppose I'm willing to fix and submi= t a patch to address this.</div><div><br></div><div>Do I need to put in the= proper macros to make it compile on everything from C++03 through 17? Does= anybody want to argue for continuing to maintain C++03 compatibility for f= uture OpenEXR releases, or is it finally time (six years after the C++ stan= dard and 2+ years after VFXPlatform) to raise the floor to C++11?</div><div= ><br></div><div><span class=3D"m_-399485205649928793m_7517529850997932784m_= -6079636075028917681m_6758675243403444048Apple-tab-span" style=3D"white-spa= ce:pre-wrap"> </span>-- lg</div><div><br></div><div><div><div class=3D"m_-3= 99485205649928793m_7517529850997932784m_-6079636075028917681h5"><br><div><b= lockquote type=3D"cite"><div>On Aug 9, 2017, at 11:38 PM, Werner Benger <= ;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= </a>> wrote:</div><br class=3D"m_-399485205649928793m_751752985099793278= 4m_-6079636075028917681m_6758675243403444048Apple-interchange-newline"><div= ><div>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 en= abled. The highest C++ version that can be used to compile it is C++14, whe= re it's still just a warning, while in C++17 it's an error. It woul= d be good to have OpenEXR at least compilable in C++17.=C2=A0 Major C++ lib= raries such as QT are using C++11 nowadays, so it seems pretty safe to go b= eyond C++03 for modern applications, a lot of things are indeed much easier= .<br><br> =C2=A0=C2=A0=C2=A0=C2=A0Werner<br><br><br>On 10.08.2017 00:20, La= rry Gritz wrote:<br><blockquote type=3D"cite">In a test compile with gcc 7,= I get lots of errors of the following ilk:<br><br>/home/travis/build/lgrit= z/open<wbr>exr/IlmBase/Imath/ImathVec.h:<wbr>228:34: warning: dynamic excep= tion specifications are deprecated in C++11 [-Wdeprecated]<br> =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0const Vec2 & normalizeExc () throw (IEX_NAMESPACE::Ma= thExc);<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<wbr>=C2=A0=C2=A0=C2=A0=C2=A0^~~~= ~<br><br>I can disable this particular warning, of course, but it's wor= th noting that the OpenEXR code base is not C++11 compliant. But in additio= n to using some C++03 idioms that are deprecated in C++11, perhaps more imp= ortantly, the code is not taking advantage of new features such as move sem= antics, constexpr, nothrow, and others. For the Imath classes especially, u= sing some of these may actually confer a performance benefit.<br><br>I feel= kind of bad pointing this out while not really having the time at the mome= nt to code up and submit an actual patch myself, but I thought I'd at l= east 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 t= o continue to support C++03. For point of reference, the VFX Reference Plat= form [<a href=3D"http://www.vfxplatform.com/" target=3D"_blank">http://www.= vfxplatform.com/</a>] dictated C++11 for 2016 and 2017, and will be C++14 f= or 2018.<br><br><span class=3D"m_-399485205649928793m_7517529850997932784m_= -6079636075028917681m_6758675243403444048Apple-tab-span" style=3D"white-spa= ce:pre-wrap"> </span>-- lg<br><br>--<br>Larry Gritz<br><a href=3D"mailto:lg= @larrygritz.com" target=3D"_blank">[email protected]</a><br><br><br><br><br= ><br>______________________________<wbr>_________________<br>Openexr-devel = mailing list<br><a href=3D"mailto:[email protected]" target=3D"_blan= k">[email protected]</a><br><a href=3D"https://lists.nongnu.org/mail= man/listinfo/openexr-devel" target=3D"_blank">https://lists.nongnu.org/mail= m<wbr>an/listinfo/openexr-devel</a><br></blockquote><br>-- <br>____________= __________________<wbr>______________________________<wbr>_______________<b= r>Dr. Werner Benger =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Visualization Research<br>Center for Co= mputation & Technology at Louisiana State University (CCT/LSU)<br>2019 = =C2=A0Digital Media Center, Baton Rouge, Louisiana 70803<br>Tel.: <a href= =3D"tel:(225)%20578-4809" value=3D"+12255784809" target=3D"_blank">+1 225 5= 78 4809</a> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Fax.: <a href=3D"tel:(225)%20578-5362" value=3D"+12255785362" target=3D"_bl= ank">+1 225 578-5362</a><br><br><br>______________________________<wbr>____= _____________<br>Openexr-devel mailing list<br><a href=3D"mailto:Openexr-de= [email protected]" target=3D"_blank">[email protected]</a><br><a href= =3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" target=3D"_bla= nk">https://lists.nongnu.org/mailm<wbr>an/listinfo/openexr-devel</a><br></d= iv></div></blockquote></div><br></div></div><div> <div style=3D"word-wrap:break-word"><div style=3D"font-family:Helvetica;fon= t-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;l= etter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;w= hite-space:normal;word-spacing:0px">--</div><div style=3D"font-family:Helve= tica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:= normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transfor= m:none;white-space:normal;word-spacing:0px">Larry Gritz</div><div style=3D"= font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:no= rmal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:= 0px;text-transform:none;white-space:normal;word-spacing:0px"><a href=3D"mai= lto:[email protected]" target=3D"_blank">[email protected]</a></div><div st= yle=3D"font-family:Helvetica;font-size:14px;font-style:normal;font-variant-= caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-= indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></d= iv><br class=3D"m_-399485205649928793m_7517529850997932784m_-60796360750289= 17681m_6758675243403444048Apple-interchange-newline"></div><br class=3D"m_-= 399485205649928793m_7517529850997932784m_-6079636075028917681m_675867524340= 3444048Apple-interchange-newline"> </div> <br></div></div><br>______________________________<wbr>_________________<br= > Openexr-devel mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Openexr-devel= @nongnu.org</a><br> <a href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" rel=3D"= noreferrer" target=3D"_blank">https://lists.nongnu.org/mailm<wbr>an/listinf= o/openexr-devel</a><br> <br></blockquote></div><br></div> </div></blockquote></div><br></div></div></div><div style=3D"word-wrap:brea= k-word"><div><div><div> <div style=3D"word-wrap:break-word"><div style=3D"font-family:Helvetica;fon= t-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;l= etter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;w= hite-space:normal;word-spacing:0px">--</div><div style=3D"font-family:Helve= tica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:= normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transfor= m:none;white-space:normal;word-spacing:0px">Larry Gritz</div><div style=3D"= font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:no= rmal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:= 0px;text-transform:none;white-space:normal;word-spacing:0px"><a href=3D"mai= lto:[email protected]" target=3D"_blank">[email protected]</a></div><div st= yle=3D"font-family:Helvetica;font-size:14px;font-style:normal;font-variant-= caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-= indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></d= iv><br class=3D"m_-399485205649928793m_7517529850997932784m_-60796360750289= 17681Apple-interchange-newline"></div><br class=3D"m_-399485205649928793m_7= 517529850997932784m_-6079636075028917681Apple-interchange-newline"> </div> <br></div></div></div></blockquote></div></div> </div></div><br>______________________________<wbr>_________________<br> Openexr-devel mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Openexr-devel= @nongnu.org</a><br> <a href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" rel=3D"= noreferrer" target=3D"_blank">https://lists.nongnu.org/mailm<wbr>an/listinf= o/openexr-devel</a><br> <br></blockquote></div><br></div> ______________________________<wbr>_________________<br>Openexr-devel maili= ng list<br><a href=3D"mailto:[email protected]" target=3D"_blank">Op= [email protected]</a><br><a href=3D"https://lists.nongnu.org/mailman/l= istinfo/openexr-devel" target=3D"_blank">https://lists.nongnu.org/<wbr>mail= man/listinfo/openexr-devel</a><br></div></blockquote></div><br><div> <div style=3D"word-wrap:break-word"><div style=3D"color:rgb(0,0,0);font-fam= ily:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;fon= t-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text= -transform:none;white-space:normal;word-spacing:0px">--</div><div style=3D"= color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;fon= t-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:s= tart;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0p= x">Larry Gritz</div><div style=3D"color:rgb(0,0,0);font-family:Helvetica;fo= nt-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;= letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;= white-space:normal;word-spacing:0px"><a href=3D"mailto:[email protected]" t= arget=3D"_blank">[email protected]</a></div><div style=3D"color:rgb(0,0,0);= font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:no= rmal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:= 0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><br = class=3D"m_-399485205649928793Apple-interchange-newline"></div><br class=3D= "m_-399485205649928793Apple-interchange-newline"> </div> <br></div></div></div></div></div></blockquote></div><br></div> --001a113dd9f6cfd82205566dfa0a-- --===============4937892323486411709== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Openexr-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/openexr-devel --===============4937892323486411709==--