few more POCO_NO_SOO compile fixes
This commit is contained in:
Родитель
acbcfc140a
Коммит
5873c8e362
|
@ -59,12 +59,9 @@ template <class> class VarHolderImpl;
|
|||
|
||||
}
|
||||
|
||||
|
||||
template <typename PlaceholderT
|
||||
#ifndef POCO_NO_SOO
|
||||
, unsigned int SizeV = POCO_SMALL_OBJECT_SIZE
|
||||
#endif
|
||||
>
|
||||
|
||||
template <typename PlaceholderT, unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
|
||||
union Placeholder
|
||||
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small
|
||||
/// object optimization).
|
||||
|
@ -112,7 +109,7 @@ public:
|
|||
|
||||
// MSVC71,80 won't extend friendship to nested class (Any::Holder)
|
||||
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSVC_VERSION > 80))
|
||||
// private:
|
||||
private:
|
||||
#endif
|
||||
|
||||
PlaceholderT* pHolder;
|
||||
|
@ -127,6 +124,48 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#else // !POCO_NO_SOO
|
||||
|
||||
|
||||
template <typename PlaceholderT>
|
||||
union Placeholder
|
||||
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small
|
||||
/// object optimization).
|
||||
///
|
||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage,
|
||||
/// it will be placement-new-allocated into the local buffer
|
||||
/// (i.e. there will be no heap-allocation). The local buffer size is one byte
|
||||
/// larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value indicating
|
||||
/// where the object was allocated (0 => heap, 1 => local).
|
||||
{
|
||||
public:
|
||||
|
||||
Placeholder ()
|
||||
{
|
||||
}
|
||||
|
||||
PlaceholderT* content() const
|
||||
{
|
||||
return pHolder;
|
||||
}
|
||||
|
||||
// MSVC71,80 won't extend friendship to nested class (Any::Holder)
|
||||
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSVC_VERSION > 80))
|
||||
private:
|
||||
#endif
|
||||
|
||||
PlaceholderT* pHolder;
|
||||
|
||||
friend class Any;
|
||||
friend class Dynamic::Var;
|
||||
friend class Dynamic::VarHolder;
|
||||
template <class> friend class Dynamic::VarHolderImpl;
|
||||
};
|
||||
|
||||
|
||||
#endif // POCO_NO_SOO
|
||||
|
||||
|
||||
class Any
|
||||
/// An Any class represents a general type and is capable of storing any type, supporting type-safe extraction
|
||||
/// of the internally stored data.
|
||||
|
|
Загрузка…
Ссылка в новой задаче