boostorg / boostorg/multi_array
Feature request: constructor and resize from values
- Lingua principale
- C++
- Stelle
- 32
- Fork
- 39
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia individuando il costruttore di multi_array e le API di resize descritte nell’issue, quindi esamina come inizializzano attualmente gli elementi e come std::vector accetta un valore. Determina il design supportato per fornire un value_type durante la creazione o il ridimensionamento di un array. Il lavoro è completato quando le classi non costruibili di default possono essere memorizzate senza errori gravi del compilatore e il comportamento esistente basato sugli extent rimane supportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- data
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100