mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
Refactor/any soo (#3564)
* refactor(Any): SOO - encapsulate data holders - add missing gets and ops - eliminate g++ warnings with enable_if's - default enable SOO * refactor(Placeholder): encapsulate SOO memory management and fix leaks; cf. #3297 #3514 * fix(Placeholder): asan errors and add tests cf. #3297 #3514
This commit is contained in:
committed by
GitHub
parent
7ae6b60e9f
commit
9c976da830
@@ -74,19 +74,15 @@
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
// !!! NOTE: Any/Dynamic::Var SOO will NOT work reliably !!!
|
||||
// !!! without C++11 (std::aligned_storage in particular). !!!
|
||||
// !!! Only comment this out if your compiler has support !!!
|
||||
// !!! for std::aligned_storage. !!!
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
//
|
||||
#ifndef POCO_ENABLE_SOO
|
||||
#define POCO_NO_SOO
|
||||
#endif
|
||||
//#define POCO_NO_SOO
|
||||
|
||||
|
||||
// Small object size in bytes. When assigned to Any or Var,
|
||||
// objects larger than this value will be alocated on the heap,
|
||||
// while those smaller will be placement new-ed into an
|
||||
// internal buffer.
|
||||
// internal stack-auto-allocated buffer.
|
||||
#if !defined(POCO_SMALL_OBJECT_SIZE) && !defined(POCO_NO_SOO)
|
||||
#define POCO_SMALL_OBJECT_SIZE 32
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user