Hasty Briefsbeta

Implicit creation of objects for low-level object manipulation

a day ago
  • #Object Lifetime
  • #Memory Management
  • #C++
  • Resolves CWG2325 by proposing implicit object creation for certain types.
  • Defines implicit-lifetime types as those with trivial constructors or destructors.
  • Operations like malloc, memcpy, and memmove implicitly create objects in specified storage.
  • Introduces std::start_lifetime_as for direct object creation in existing storage.
  • Changes pseudo-destructor calls to end object lifetimes, affecting constant expressions.
  • Proposes splitting the solution into core language changes and library additions.
  • Includes wording updates across multiple sections of the C++ standard.