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

std::multimap::clear is not noexcept

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Medium
    • Resolution: Unresolved
    • Code Generation Tools
    • CODEGEN-4276
    • Hide
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      C2000_22.6.0.LTS
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      MSP430_21.6.0.LTS
      C2000_21.6.0.LTS
      MSP430_18.12.0.LTS
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      Show
      ARM_18.1.0.LTS MSP430_18.1.0.LTS C2000_22.6.0.LTS MSP430_20.2.0.LTS ARM_18.12.0.LTS MSP430_21.6.0.LTS C2000_21.6.0.LTS MSP430_18.12.0.LTS ARM_20.2.0.LTS C2000_20.2.0.LTS
    • The library does not declare std::multimap::clear as noexcept, which is required by C++14 section 23.4.5.1 paragraph 2

    Description

      clearing multimap of pairs unexpectedly throws exception

      In the following code:

      #include <map>
      #include <string>
      #define NMAP std::multimap<int, char>
      #define NPAIR std::pair<int, char>

      int main(void)
      {
      const NPAIR p100(1, 'a'), p200(2, 'b'), p300(3, 'c');
      NMAP cl00

      { p100, p200, p300}

      ;
      if (!noexcept(cl00.clear()))
      failure("Unexpected return type");
      return (2);
      }
      An exception gets thrown in the clear() function when clearing a multimap if <int,char> pairs.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: