Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-8578

Non-standard partial ordering of variadic template partial specialization

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Medium
    • Resolution: Unresolved
    • 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

    Description

      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!");

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: