summaryrefslogtreecommitdiff
path: root/zenXml/zenxml/cvrt_struc.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-10 02:46:25 +0000
committerB Stack <bgstack15@gmail.com>2018-09-10 02:46:25 +0000
commit728d32e6da9ce66968f8eef47a59505d613e2c1b (patch)
tree0f0441755ff0e6d65e12222d4502c648bffd6a7c /zenXml/zenxml/cvrt_struc.h
parent10.3 (diff)
parentpull in latest 10.4 from upstream (diff)
downloadFreeFileSync-728d32e6da9ce66968f8eef47a59505d613e2c1b.tar.gz
FreeFileSync-728d32e6da9ce66968f8eef47a59505d613e2c1b.tar.bz2
FreeFileSync-728d32e6da9ce66968f8eef47a59505d613e2c1b.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-xzenXml/zenxml/cvrt_struc.h26
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) };
+};
//######################################################################################
bgstack15