From eb5d3e5df99de2c3d8da2e8bc7b12ed427465dba Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 9 Sep 2018 18:53:23 -0400 Subject: pull in latest 10.4 from upstream --- zenXml/zenxml/cvrt_struc.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'zenXml/zenxml/cvrt_struc.h') 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 ::value>; -namespace impl_2384343 +template +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 -using IsStlPair = std::bool_constant< - impl_2384343::HasMemberType_first_type ::value && - impl_2384343::HasMemberType_second_type::value && - impl_2384343::HasMember_first ::value && - impl_2384343::HasMember_second ::value>; +private: + using Yes = char[1]; + using No = char[2]; + + template + static Yes& isPair(const std::pair&); + static No& isPair(...); +public: + enum { value = sizeof(isPair(std::declval())) == sizeof(Yes) }; +}; //###################################################################################### -- cgit