Page MenuHomeFeedback Tracker

Map type intialization
Assigned, UrgentPublic

Description

There's currently no way to initialize a map type with values, unlike arrays. The following would be the C++ initialization for map types. Unsure if this is possible, because the compiler thinks I'm trying to initialize an array.

class SegmentDisplay
{
	static ref map<string, int> Dictionary =
	{
		{"A", Segment.A | Segment.B | Segment.C | Segment.E | Segment.F | Segment.G},
		{"B", Segment.A | Segment.B | Segment.C | Segment.D | Segment.G2 | Segment.H},
		{"C", Segment.A | Segment.D | Segment.E | Segment.F}
	};
}

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

Geez changed the task status from New to Assigned.Apr 4 2022, 1:40 PM
lava76 added a subscriber: lava76.Apr 19 2023, 10:41 PM
inkihh added a subscriber: inkihh.Feb 11 2024, 8:59 PM