Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18879

SunStudio 12.1 and Oracle Studio 12.2 support template template functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.8.6
    • 4.7.2
    • Core: Other
    • None
    • Solaris 10, Oracle Solaris 11 Express, OpenIndiana b148
    • 587d832f715771b80e31f35372efc60f09316d55

    Description

      src/corelib/global/qglobal.h incorrectly defines QT_NO_TEMPLATE_TEMPLATE_PARAMETERS

      around line 666

      1. if __SUNPRO_CC >= 0x500
      2. define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
        /* see http://developers.sun.com/sunstudio/support/Ccompare.html */

      A reasonable fix would be

      --- ./src/corelib/global/qglobal.h.orig 2010-09-24 00:28:42.346692014 +0200
      +++ ./src/corelib/global/qglobal.h      2011-04-20 23:29:18.182349121 +0200
      @@ -664,8 +664,11 @@
           in which case _BOOL is not defined
               this is the default in 4.2 compatibility mode triggered by -compat=4 */
       #  if __SUNPRO_CC >= 0x500
      -#    define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
      -   /* see http://developers.sun.com/sunstudio/support/Ccompare.html */
      +#    if __SUNPRO_CC <= 0x590
      +     /* If it's Sun Studio12.1 or later, template template parameters are ok. */
      +#      define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
      +     /* see http://developers.sun.com/sunstudio/support/Ccompare.html */
      +#    endif
       #    if __SUNPRO_CC >= 0x590
       #      define Q_ALIGNOF(type)   __alignof__(type)
       #      define Q_TYPEOF(expr)    __typeof__(expr)
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seahumad [BB] Sergio Ahumada (Inactive)
            suntzutech Ben Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes