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

<regex> never throws error_ctype

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Medium
    • Resolution: Unresolved
    • Code Generation Tools
    • CODEGEN-4071
    • 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
      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
    • Hide
      Due to an implementation detail, the <regex> header will never throw an exception corresponding to std::regex_constants::error_ctype. This can be exhibited from the below code sample:

      #include <regex>
      int main(void) {

        try {
          std::regex e("[[:not_a_class:]]", std::regex_constants::ECMAScript);
          std::regex_match("a", e);
        }
        catch(std::regex_error e){
          // e.code() will not be std::regex_constants::error_ctype
        }
        return 0;
      }
      Show
      Due to an implementation detail, the <regex> header will never throw an exception corresponding to std::regex_constants::error_ctype. This can be exhibited from the below code sample: #include <regex> int main(void) {   try {     std::regex e("[[:not_a_class:]]", std::regex_constants::ECMAScript);     std::regex_match("a", e);   }   catch(std::regex_error e){     // e.code() will not be std::regex_constants::error_ctype   }   return 0; }

    Description

      <regex> never throws error_ctype

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: