boostorg / boostorg/lambda2

Construction and destruction?

Offen
#6 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
25
Forks
16
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I propose to do it like in a boost.lambda. Additionally adding `aggregate` and `new_aggregated_ptr`:
```
constructor()(arg_list) T(arg_list)
aggregate()(arg_list) T{arg_list}
destructor()(a) a.~A(), where a is of type A
destructor()(pa) pa->~A(), where pa is of type A*
new_ptr()(arg_list) new T(arg_list)
new_aggregated_ptr()(arg_list) new T{arg_list}
new_array()(sz, val_list) new T[sz]{val_list}
delete_ptr()(p) delete p
delete_array()(p) delete[] p
```
https://www.boost.org/doc/libs/1_76_0/doc/html/lambda/le_in_details.html#lambda.construction_and_destruction

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.