Non-standard partial ordering of variadic template partial specialization

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-4026
    • Hide
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      MSP430_21.6.0.LTS
      MSP430_18.12.0.LTS
      ARM_20.2.0.LTS
      Show
      ARM_18.1.0.LTS MSP430_18.1.0.LTS MSP430_20.2.0.LTS ARM_18.12.0.LTS MSP430_21.6.0.LTS MSP430_18.12.0.LTS ARM_20.2.0.LTS

      The compiler fails to compile an example from C++14 Section 14.8.2.5 paragraph 9. The code has been adapted with a self-check below:

      template<class T, class... U> struct A
      { static constexpr bool f()

      { return false; } }; // #1

      template<class T1, class T2, class... U> struct A<T1, T2*, U...>
      { static constexpr bool f() { return true; } }; // #2

      template<class T1, class T2> struct A<T1, T2>
      { static constexpr bool f() { return false; }

      }; // #3

      using x = A<int, int*>; // selects #2
      static_assert(x::f(), "Whoops!");

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-1081 - Non-standard partial ordering of va...
                SYNCHRONIZED
                • Last Sync Date: