chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
89 stars 15 forks source link

Remove static ctor methods for "aggregate type" ctors #315

Closed danakj closed 1 year ago

danakj commented 1 year ago

When the ctor just takes the values to be stored in the type, it can just be a ctor.

We avoid ctor overloads still, where different ctors mean different things. For example with_capacity() constructs a Vec with a capacity it doesn't specify the items to go in the Vec.