boostorg / boostorg/multi_array
Feature request: constructor and resize from values
- Vorherrschende Sprache
- C++
- Sterne
- 32
- Forks
- 39
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hello, this is a copy of my email I sent to the boost-users mailing list, as it might improve visibility.
I'd love to be able to use multi_array with classes that do not have a default constructor. At the moment, this is impossible, as both the constructor and resize functions only take extents as arguments (and possibly some other options), but no value_type, as for example std::vector does. Thus, trying to store objects without a default constructor in a multi_array results in hard compiler errors, with no workaround that I know of.
This happens to me fairly often, as I use multi_array to organize sets of complex objects. If there is a technical reason why this is not possible, I would also be happy to learn it.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, den im Issue beschriebenen multi_array-Konstruktor und die resize-APIs zu finden. Untersuche anschließend, wie sie derzeit Elemente initialisieren und wie std::vector einen Wert akzeptiert. Ermittle das unterstützte Design zum Bereitstellen eines value_type beim Erstellen oder Ändern der Größe eines Arrays. Als erledigt gilt die Aufgabe, wenn Klassen, die nicht standardmäßig konstruierbar sind, ohne harte Compilerfehler gespeichert werden können und das bestehende Verhalten auf Grundlage der Extents weiterhin unterstützt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- data
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100