Re: C++11, 'throw', etc.
Larry Gritz <[email protected]> Thu, 10 Aug 2017 12:49:16 -0700
| Newsgroups | gmane.comp.video.openexr.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============4802237139268438469== Content-Type: multipart/alternative; boundary="Apple-Mail=_E3F59E83-C783-4A18-BBAA-7744BD0997D4" --Apple-Mail=_E3F59E83-C783-4A18-BBAA-7744BD0997D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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: >=20 > 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. >=20 > On Thu, Aug 10, 2017 at 11:52 AM, Piotr Stanczyk = <[email protected] <mailto:[email protected]>> wrote: > Sounds like a sensible plan to me.=20 >=20 > Anyone from ILM care to comment on this? Can you foresee any internal = build issues? >=20 > Piotr >=20 > On Thu, Aug 10, 2017 at 11:40 AM Larry Gritz <[email protected] = <mailto:[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). >=20 > We're only talking about moving forward, so a stray downstream product = stuck on C++03 can keep using OpenEXR <=3D 2.2. >=20 > 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. >=20 > -- lg >=20 >=20 >> On Aug 10, 2017, at 11:12 AM, Piotr Stanczyk = <[email protected] <mailto:[email protected]>> wrote: >>=20 >> Are there any vendors for whom this would cause an issue? Else, I = would vote for moving things forward=20 >>=20 >>=20 >> On 10 August 2017 at 10:18, Larry Gritz <[email protected] = <mailto:[email protected]>> wrote: >> Ugh, so it's worse than I thought. >>=20 >> I suppose I'm willing to fix and submit a patch to address this. >>=20 >> 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? >>=20 >> -- lg >>=20 >>=20 >>> On Aug 9, 2017, at 11:38 PM, Werner Benger <[email protected] = <mailto:[email protected]>> wrote: >>>=20 >>> 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. >>>=20 >>> Werner >>>=20 >>>=20 >>> 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: >>>>=20 >>>> /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); >>>> ^~~~~ >>>>=20 >>>> 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. >>>>=20 >>>> 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/ = <http://www.vfxplatform.com/>] dictated C++11 for 2016 and 2017, and = will be C++14 for 2018. >>>>=20 >>>> -- lg >>>>=20 >>>> -- >>>> Larry Gritz >>>> [email protected] <mailto:[email protected]> >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> _______________________________________________ >>>> Openexr-devel mailing list >>>> [email protected] <mailto:[email protected]> >>>> https://lists.nongnu.org/mailman/listinfo/openexr-devel = <https://lists.nongnu.org/mailman/listinfo/openexr-devel> >>>=20 >>> --=20 >>> = __________________________________________________________________________= _ >>> 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 <tel:(225)%20578-4809> = Fax.: +1 225 578-5362 <tel:(225)%20578-5362> >>>=20 >>>=20 >>> _______________________________________________ >>> Openexr-devel mailing list >>> [email protected] <mailto:[email protected]> >>> https://lists.nongnu.org/mailman/listinfo/openexr-devel = <https://lists.nongnu.org/mailman/listinfo/openexr-devel> >>=20 >> -- >> Larry Gritz >> [email protected] <mailto:[email protected]> >>=20 >>=20 >>=20 >>=20 >>=20 >> _______________________________________________ >> Openexr-devel mailing list >> [email protected] <mailto:[email protected]> >> https://lists.nongnu.org/mailman/listinfo/openexr-devel = <https://lists.nongnu.org/mailman/listinfo/openexr-devel> >>=20 >>=20 >=20 > -- > Larry Gritz > [email protected] <mailto:[email protected]> >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > Openexr-devel mailing list > [email protected] <mailto:[email protected]> > https://lists.nongnu.org/mailman/listinfo/openexr-devel = <https://lists.nongnu.org/mailman/listinfo/openexr-devel> >=20 >=20 > _______________________________________________ > Openexr-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/openexr-devel -- Larry Gritz [email protected] --Apple-Mail=_E3F59E83-C783-4A18-BBAA-7744BD0997D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">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?<div class=3D""><br class=3D""><div class=3D""><br = class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On = Aug 10, 2017, at 12:41 PM, Deke Kincaid <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = class=3D"">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.<br class=3D""></div><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Aug 10, 2017 at 11:52 AM, Piotr Stanczyk <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:[email protected]" = target=3D"_blank" class=3D"">[email protected]</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div = class=3D"">Sounds like a sensible plan to me. </div><div = class=3D""><br class=3D""></div><div class=3D"">Anyone from ILM care to = comment on this? Can you foresee any internal build issues?</div><span = class=3D"HOEnZb"><font color=3D"#888888" class=3D""><div class=3D""><br = class=3D""></div><div class=3D"">Piotr</div></font></span><div = class=3D"HOEnZb"><div class=3D"h5"><div class=3D""><br class=3D""><div = class=3D"gmail_quote"><div class=3D"">On Thu, Aug 10, 2017 at 11:40 AM = Larry Gritz <<a href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a>> wrote:<br = class=3D""></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 = .8ex;border-left:1px #ccc solid;padding-left:1ex"><div = style=3D"word-wrap:break-word" class=3D"">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).<div class=3D""><br class=3D""></div><div = class=3D"">We're only talking about moving forward, so a stray = downstream product stuck on C++03 can keep using OpenEXR <=3D = 2.2.</div><div class=3D""><br class=3D""></div><div class=3D"">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.</div><div class=3D""><br class=3D""></div><div = class=3D""><span = class=3D"m_7517529850997932784m_-6079636075028917681Apple-tab-span" = style=3D"white-space:pre-wrap"> </span>-- lg</div><div class=3D""><br = class=3D""><div class=3D""></div></div></div><div = style=3D"word-wrap:break-word" class=3D""><div class=3D""><div = class=3D""><br class=3D""><div class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D"">On Aug 10, 2017, at 11:12 AM, Piotr Stanczyk = <<a href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"m_7517529850997932784m_-6079636075028917681Apple-interchange-newl= ine"><div class=3D""><div class=3D"">Are there any vendors for whom this = would cause an issue? Else, I would vote for moving things = forward <div class=3D""><br class=3D""></div></div><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On 10 = August 2017 at 10:18, Larry Gritz <span class=3D""><<a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a>></span> wrote:<br = class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 = .8ex;border-left:1px #ccc solid;padding-left:1ex"><div = style=3D"word-wrap:break-word" class=3D"">Ugh, so it's worse than I = thought.<div class=3D""><br class=3D""></div><div class=3D"">I suppose = I'm willing to fix and submit a patch to address this.</div><div = class=3D""><br class=3D""></div><div class=3D"">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?</div><div class=3D""><br class=3D""></div><div = class=3D""><span = class=3D"m_7517529850997932784m_-6079636075028917681m_6758675243403444048A= pple-tab-span" style=3D"white-space:pre-wrap"> </span>-- lg</div><div = class=3D""><br class=3D""></div><div class=3D""><div class=3D""><div = class=3D"m_7517529850997932784m_-6079636075028917681h5"><br = class=3D""><div class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On Aug 9, 2017, at 11:38 PM, Werner Benger <<a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"m_7517529850997932784m_-6079636075028917681m_6758675243403444048A= pple-interchange-newline"><div class=3D""><div class=3D"">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.<br class=3D""><br class=3D""> = Werner<br class=3D""><br class=3D""><br = class=3D"">On 10.08.2017 00:20, Larry Gritz wrote:<br = class=3D""><blockquote type=3D"cite" class=3D"">In a test compile with = gcc 7, I get lots of errors of the following ilk:<br class=3D""><br = class=3D"">/home/travis/build/lgritz/<wbr = class=3D"">openexr/IlmBase/Imath/<wbr class=3D"">ImathVec.h:228:34: = warning: dynamic exception specifications are deprecated in C++11 = [-Wdeprecated]<br class=3D""> const Vec2 = & normalizeExc () throw (IEX_NAMESPACE::MathExc);<br class=3D""> = &n= bsp; &nbs= p; <wbr = class=3D""> ^~~~~<br class=3D""><br class=3D"">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.<br class=3D""><br class=3D"">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 [<a = href=3D"http://www.vfxplatform.com/" target=3D"_blank" = class=3D"">http://www.vfxplatform.com/</a>] dictated C++11 for 2016 and = 2017, and will be C++14 for 2018.<br class=3D""><br class=3D""><span = class=3D"m_7517529850997932784m_-6079636075028917681m_6758675243403444048A= pple-tab-span" style=3D"white-space:pre-wrap"> </span>-- lg<br = class=3D""><br class=3D"">--<br class=3D"">Larry Gritz<br class=3D""><a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a><br class=3D""><br class=3D""><br = class=3D""><br class=3D""><br class=3D""><br = class=3D"">______________________________<wbr = class=3D"">_________________<br class=3D"">Openexr-devel mailing list<br = class=3D""><a href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a><br class=3D""><a = href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" = target=3D"_blank" class=3D"">https://lists.nongnu.org/<wbr = class=3D"">mailman/listinfo/openexr-devel</a><br = class=3D""></blockquote><br class=3D"">-- <br = class=3D"">______________________________<wbr = class=3D"">______________________________<wbr = class=3D"">_______________<br class=3D"">Dr. Werner Benger = &n= bsp; Visualization Research<br class=3D"">Center for = Computation & Technology at Louisiana State University (CCT/LSU)<br = class=3D"">2019 Digital Media Center, Baton Rouge, Louisiana = 70803<br class=3D"">Tel.: <a href=3D"tel:(225)%20578-4809" = value=3D"+12255784809" target=3D"_blank" class=3D"">+1 225 578 4809</a> = &n= bsp; Fax.: <a = href=3D"tel:(225)%20578-5362" value=3D"+12255785362" target=3D"_blank" = class=3D"">+1 225 578-5362</a><br class=3D""><br class=3D""><br = class=3D"">______________________________<wbr = class=3D"">_________________<br class=3D"">Openexr-devel mailing list<br = class=3D""><a href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a><br class=3D""><a = href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" = target=3D"_blank" class=3D"">https://lists.nongnu.org/<wbr = class=3D"">mailman/listinfo/openexr-devel</a><br = class=3D""></div></div></blockquote></div><br class=3D""></div></div><div = class=3D""> <div style=3D"word-wrap:break-word" class=3D""><div = style=3D"font-family:Helvetica;font-size:14px;font-style:normal;font-varia= nt-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;t= ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" = class=3D"">--</div><div = style=3D"font-family:Helvetica;font-size:14px;font-style:normal;font-varia= nt-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;t= ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" = class=3D"">Larry Gritz</div><div = style=3D"font-family:Helvetica;font-size:14px;font-style:normal;font-varia= nt-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;t= ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" = class=3D""><a href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a></div><div = style=3D"font-family:Helvetica;font-size:14px;font-style:normal;font-varia= nt-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;t= ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" = class=3D""><br class=3D""></div><br = class=3D"m_7517529850997932784m_-6079636075028917681m_6758675243403444048A= pple-interchange-newline"></div><br = class=3D"m_7517529850997932784m_-6079636075028917681m_6758675243403444048A= pple-interchange-newline"> </div> <br class=3D""></div></div><br = class=3D"">______________________________<wbr = class=3D"">_________________<br class=3D""> Openexr-devel mailing list<br class=3D""> <a href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a><br class=3D""> <a href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" = rel=3D"noreferrer" target=3D"_blank" = class=3D"">https://lists.nongnu.org/<wbr = class=3D"">mailman/listinfo/openexr-devel</a><br class=3D""> <br class=3D""></blockquote></div><br class=3D""></div> </div></blockquote></div><br class=3D""></div></div></div><div = style=3D"word-wrap:break-word" class=3D""><div class=3D""><div = class=3D""><div class=3D""> <div style=3D"word-wrap:break-word" class=3D""><div style=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;" class=3D"">--</div><div style=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;" class=3D"">Larry Gritz</div><div style=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;" class=3D""><a href=3D"mailto:[email protected]" = target=3D"_blank" class=3D"">[email protected]</a></div><div = style=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;" class=3D""><br class=3D""></div><br = class=3D"m_7517529850997932784m_-6079636075028917681Apple-interchange-newl= ine"></div><br = class=3D"m_7517529850997932784m_-6079636075028917681Apple-interchange-newl= ine"> </div> <br class=3D""></div></div></div></blockquote></div></div> </div></div><br class=3D"">______________________________<wbr = class=3D"">_________________<br class=3D""> Openexr-devel mailing list<br class=3D""> <a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br class=3D""> <a href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" = rel=3D"noreferrer" target=3D"_blank" = class=3D"">https://lists.nongnu.org/<wbr = class=3D"">mailman/listinfo/openexr-devel</a><br class=3D""> <br class=3D""></blockquote></div><br class=3D""></div> _______________________________________________<br = class=3D"">Openexr-devel mailing list<br class=3D""><a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br = class=3D"">https://lists.nongnu.org/mailman/listinfo/openexr-devel<br = class=3D""></div></blockquote></div><br class=3D""><div class=3D""> <div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D""><div style=3D"color: = rgb(0, 0, 0); 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; -webkit-text-stroke-width: = 0px;">--</div><div style=3D"color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px;">Larry = Gritz</div><div style=3D"color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px;"><a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a></div><div style=3D"color: rgb(0, 0, 0); = 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; -webkit-text-stroke-width: 0px;" class=3D""><br= class=3D""></div><br class=3D"Apple-interchange-newline"></div><br = class=3D"Apple-interchange-newline"> </div> <br class=3D""></div></div></body></html>= --Apple-Mail=_E3F59E83-C783-4A18-BBAA-7744BD0997D4-- --===============4802237139268438469== 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 --===============4802237139268438469==--