Page MenuHomeFeedback Tracker

Enscript static array initializer overload error
Assigned, UrgentPublic

Description

void TestFnc(int value)
{
}

void TestFnc(array<int> values)
{
}

...

TestFnc({1,2,3});

results in

---------------------------
Compile error
---------------------------
[...] Array initialization of non-array type

for the line that tries to call the function.

I guess the compiler tries to match the wrong function overload which causes this error down the line. If ONLY the array overload exits this works fine. The ordering of functions does not matter.

The expected behavior would be {1,2,3} creates an array<int> instance, which is taken to match the function overloads - and thus the array variant is called.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Additional Information

Please forward this to the Enfusion team so this can be fixed.

Event Timeline

Arkensor created this task.Jun 8 2021, 3:21 PM
Geez changed the task status from New to Assigned.Jun 10 2021, 11:52 AM
komer added a subscriber: komer.Aug 19 2021, 12:22 AM