clean-core (cc) is a clean and lean reimagining of the C++ standard library.
- significantly faster to compile than
std - forward declaration for all public types
- no slower than
std - safer than
std - more modular header design (each type can be separately included)
- convenient interfacing with code using
stdtypes - removal of unintuitive behavior (e.g.
vector<bool>oroptional::operator bool) - mostly keeping naming scheme and intent of
std - better debugging support and performance
- no dependency on
exceptions
- a C++17 compiler
- a few
stdfeatures (that are hard to otherwise implement)
<cstring>(1ms, for memcpy)<cstddef>(1ms, for some types)<type_traits>(5-8ms, many not implementable ourselves)<utility>(10-15ms, swap, declval, NOTE:cchas own move and forward)<atomic>(20ms, hard to implement ourselves)
Changes that were rarely used features that increased implementation cost immensely:
- no
allocators - no custom deleters for
unique_ptr
Error-prone and unintuitive or suprising features:
- no specialized
vector<bool> - no
operator boolforoptional<T> - no
operator<foroptional<T>
Others:
- no strong
exceptionsupport - no iterator-pair library, only ranges
- no unreadable
_UglyCase(leaking non-caps macros is a sin) - traits types and values are not suffixed with
_tor_v - no
volatilesupport - no
unique_ptr<T[]> - some interfaces are stricter to prevent easy mistakes
span(strided array view)flat_containersinline_types (no heap allocs)- customizable low-impact
assert - internal assertions (optional)
- bound-checked containers
- null checks for smart pointer
- contract checks
- big list of comparison between
stdandcc- name of feature/class (e.g.
pair) - header name of
std/cc - parse time
std/cc - preprocessed, significant LOC of
std/cc
- name of feature/class (e.g.