MIT License
Pimpl(Pointer to implementation) C++(visible class)(implementation class)
handle/body,
EBCO(Empty Base Class Optimization)C++0
EBO
boost::compressed_pair, std::vectorstd::shared_ptrallocator member
CRTP(Curiously Recurring Template Pattern)C++
// CRTP idioms
template <class Derived>
class Base {
};
class Derived : public Base<Derived> {
// ...
};
template<typename T>
class DerivedTemplate : public Base<DerivedTemplate<T>> {
// ...
};
butil::LinkedListenable_shared_from_thisc++20:ranges::view_interface
Mixin(Mix in) C++:
template<typename... Mixins>
class MixinClass : public Mixins... {
public:
MixinClass() : Mixins()... {}
// ...
};
Scoped Locking RAIIlockingScoped LockingC++4
std::lock_guard, std::unique_lock, std::shared_lock std::scoped_lock
Type Erasure
Variants of the technique of using a single run-time representation for values of a number of types and relying on the (static) type system to ensure that they are used only according to their declared type has been called type erasure - Bjarne Stroustrup
<<The C++ Programming Language 4ed>>
Type ErasureC++JavaPython
: std::any std::function