icu icon indicating copy to clipboard operation
icu copied to clipboard

ICU-22920 Avoid CTAD in Formattable's constructor. NFC

Open Quuxplusone opened this issue 9 months ago • 7 comments

This line uses CTAD on pair, when every other place in the codebase uses a function call to make_pair (and no other place uses CTAD on any class template at all). Assume this was unintentional, and fix it.

warning: class template argument deduction is incompatible with
C++ standards before C++17; for compatibility, use explicit type
name 'std::pair<const Formattable *, int>'
(aka 'pair<const icu_77::message2::Formattable *, int>') [-Wctad]
      Formattable(const Formattable* arr, int32_t len) : contents(std::pair(arr, len)) {}
                                                                  ^~~~~~~~~

Checklist

  • [x] Required: Issue filed: ICU-NNNNN
  • [x] Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • [x] Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • [ ] Issue accepted (done by Technical Committee after discussion)
  • [ ] Tests included, if applicable
  • [ ] API docs and/or User Guide docs changed or added, if applicable

Quuxplusone avatar Jan 24 '25 17:01 Quuxplusone