diff options
author | B Stack <bgstack15@gmail.com> | 2018-09-10 02:46:25 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2018-09-10 02:46:25 +0000 |
commit | 728d32e6da9ce66968f8eef47a59505d613e2c1b (patch) | |
tree | 0f0441755ff0e6d65e12222d4502c648bffd6a7c /zenXml/zenxml/cvrt_struc.h | |
parent | 10.3 (diff) | |
parent | pull in latest 10.4 from upstream (diff) | |
download | FreeFileSync-e00e9e9910726f61b7eec25c042fc7b94b08647a.tar.gz FreeFileSync-e00e9e9910726f61b7eec25c042fc7b94b08647a.tar.bz2 FreeFileSync-e00e9e9910726f61b7eec25c042fc7b94b08647a.zip |
Merge branch '10.4' into 'master'10.4
pull in latest 10.4 from upstream
See merge request opensource-tracking/FreeFileSync!1
Diffstat (limited to 'zenXml/zenxml/cvrt_struc.h')
-rwxr-xr-x | zenXml/zenxml/cvrt_struc.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/zenXml/zenxml/cvrt_struc.h b/zenXml/zenxml/cvrt_struc.h index 11795107..85c5d8d0 100755 --- a/zenXml/zenxml/cvrt_struc.h +++ b/zenXml/zenxml/cvrt_struc.h @@ -65,21 +65,19 @@ using IsStlContainer = std::bool_constant< impl_2384343::HasMember_insert <T>::value>; -namespace impl_2384343 +template <class T> +struct IsStlPair { -ZEN_INIT_DETECT_MEMBER_TYPE(first_type); -ZEN_INIT_DETECT_MEMBER_TYPE(second_type); - -ZEN_INIT_DETECT_MEMBER(first) //we don't know the exact declaration of the member attribute: may be in a base class! -ZEN_INIT_DETECT_MEMBER(second) // -} - -template <typename T> -using IsStlPair = std::bool_constant< - impl_2384343::HasMemberType_first_type <T>::value && - impl_2384343::HasMemberType_second_type<T>::value && - impl_2384343::HasMember_first <T>::value && - impl_2384343::HasMember_second <T>::value>; +private: + using Yes = char[1]; + using No = char[2]; + + template <class T1, class T2> + static Yes& isPair(const std::pair<T1, T2>&); + static No& isPair(...); +public: + enum { value = sizeof(isPair(std::declval<T>())) == sizeof(Yes) }; +}; //###################################################################################### |