TestForCopyFromWrapper< T, f > Struct Template Reference

#include <general.h>

Detailed Description

template<typename T, Bool(T::*)(const T &) f>
struct cineware::TestForCopyFromWrapper< T, f >

Automatic detection of CopyFrom() method using SFINAE. If a class implements Bool CopyFrom(T& src) the constant TestForCopyFromMember<T>::IsSupported will be true. For this case the template argument deduction prefers the conversion of 0 to a pointer (using Char TestForCopyFromFunction(TestForCopyFromWrapper<T, &T::CopyFrom>*)) over binding to an ellipsis parameter (Int16 TestForCopyFromFunction(...)). If a class does not implement CopyFrom() only Int16 TestForCopyFromFunction(...) is available. Both cases can be distinguished by having different size return values.