ClickHouse/base
Robert Schulze 330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
..
base Remove inherited create() method + disallow copying 2022-05-02 08:46:52 +02:00
glibc-compatibility Remove outdated links from CI 2022-03-28 15:53:22 +02:00
harmful Update harmful.c 2021-12-22 22:55:55 +03:00
pcg-random Remove ya.make 2021-09-25 04:22:54 +03:00
readpassphrase Manipulate with -Wreserved-identifier only if HAS_RESERVED_IDENTIFIER has been detected 2021-10-03 17:42:36 +04:00
widechar_width Remove ya.make 2021-09-25 04:22:54 +03:00
CMakeLists.txt base should not depend on Common 2022-04-29 10:26:35 +08:00