std::nullptr_t cannot be used to initialize entity of type bool

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-3901
    • Hide
      ARM_18.1.0.LTS
       MSP430_18.1.0.LTS
      Show
      ARM_18.1.0.LTS  MSP430_18.1.0.LTS
    • Hide
      The following code emits a diagnostic on the initialization of 'abool'

      #include <cstddef>
      int main() {
        std::nullptr_t pnptr = nullptr;
        bool abool = pnptr; // error, nullptr_t cannot initialize an entity of type bool
        return 0;
      }
      Show
      The following code emits a diagnostic on the initialization of 'abool' #include <cstddef> int main() {   std::nullptr_t pnptr = nullptr;   bool abool = pnptr; // error, nullptr_t cannot initialize an entity of type bool   return 0; }
    • This is ill-formed code. nullptr_t can be implicitly converted to bool only in a direct initialization context. This means that...

      std::nullptr_t cannot be used to initialize entity of type bool

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

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-1073 - std::nullptr_t cannot be used to in...
                SYNCHRONIZED
                • Last Sync Date: