refs #345 Extending CValueObjectStdTuple with policy classes to enable it to be used by classes which have different requirements.

This commit is contained in:
Mathew Sutcliffe
2014-11-10 20:28:30 +00:00
parent 40362e706a
commit 2b9d4098d4
5 changed files with 459 additions and 28 deletions

View File

@@ -69,7 +69,8 @@ namespace BlackMisc
template <> class TupleConverter<T> : TupleConverterBase \
{ \
friend class T; \
friend class BlackMisc::CValueObjectStdTuple<T>; \
template <class, class> friend class BlackMisc::CValueObjectStdTuple; \
friend class BlackMisc::Private::EncapsulationBreaker; \
static_assert(Private::HasEnabledTupleConversion<T>::value, \
"Missing BLACK_ENABLE_TUPLE_CONVERSION macro in " #T); \
static auto toTuple(const T &o) -> decltype(BlackMisc::tie MEMBERS) \
@@ -120,7 +121,8 @@ namespace BlackMisc
template <class... U> class TupleConverter<T<U...>> : TupleConverterBase \
{ \
friend class T<U...>; \
friend class BlackMisc::CValueObjectStdTuple<T<U...>>; \
template <class, class> friend class BlackMisc::CValueObjectStdTuple; \
friend class BlackMisc::Private::EncapsulationBreaker; \
static_assert(Private::HasEnabledTupleConversion<T<U...>>::value, \
"Missing BLACK_ENABLE_TUPLE_CONVERSION macro in " #T); \
static auto toTuple(const T<U...> &o) -> decltype(BlackMisc::tie MEMBERS) \