Closed Bug 1750610 Opened 3 years ago Closed 3 years ago

Remove redundant template parameter from template class constructor

Categories

(Core :: JavaScript Engine, task, P5)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Constructor definition for template class doesn't need template parameter.

https://searchfox.org/mozilla-central/rev/72c7cef167829b6f1e24cae216fa261934c455fc/js/src/jit/InlineList.h#149

template <typename T>
class InlineForwardListIterator {
...
  explicit InlineForwardListIterator<T>(const InlineForwardList<T>* owner)

https://searchfox.org/mozilla-central/rev/72c7cef167829b6f1e24cae216fa261934c455fc/js/src/vm/Scope.h#1590-1591

template <>
class AbstractBindingIter<JSAtom> : public BaseAbstractBindingIter<JSAtom> {
...
  explicit AbstractBindingIter<JSAtom>(Scope* scope);
  explicit AbstractBindingIter<JSAtom>(JSScript* script);

c++17 allows such redundant parameter, but apparanetly c++20 disallows it
https://stackoverflow.com/questions/63513984/can-class-template-constructors-have-a-redundant-template-parameter-list-in-c2

and compiling the code with g++ with -std=c++20 throws the syntax error.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/79ae152be505 Remove unnecessary template parameter from template class constructor declaration. r=nbp
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: