diff options
author | Brad King <brad.king@kitware.com> | 2023-06-23 14:57:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-06-23 14:57:52 (GMT) |
commit | 81f4ede96aaebe28e372f4a8e45f83ae9aaf58ab (patch) | |
tree | d9982116d179f4bbd23b81618d0405068c0b5cb5 /Utilities | |
parent | d9a6b544b3e38d544d033b31d2ef91d32b1b149b (diff) | |
parent | 45f17e5a8566fcdec0071a5ed1bc2656968bf258 (diff) | |
download | CMake-81f4ede96aaebe28e372f4a8e45f83ae9aaf58ab.zip CMake-81f4ede96aaebe28e372f4a8e45f83ae9aaf58ab.tar.gz CMake-81f4ede96aaebe28e372f4a8e45f83ae9aaf58ab.tar.bz2 |
Merge topic 'cmList-container-conversion'
45f17e5a85 cmList: Add container conversion to string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8580
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/std/cmext/iterator | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Utilities/std/cmext/iterator b/Utilities/std/cmext/iterator index eba10dd..85a28fa 100644 --- a/Utilities/std/cmext/iterator +++ b/Utilities/std/cmext/iterator @@ -24,9 +24,18 @@ using is_input_iterator = // checks if a type is a range type: std::begin() and std::end() are supported template <typename Range> -using is_range = cm::bool_constant< - cm::is_iterator<decltype(std::begin(std::declval<const Range>()))>::value && - cm::is_iterator<decltype(std::end(std::declval<const Range>()))>::value>; +using is_range = +#if defined(_MSC_VER) && _MSC_VER < 1920 + // MS C++ is not able to evaluate complex type introspection, + // so use a simplified version + cm::bool_constant<std::is_class<Range>::value || + std::is_array<Range>::value>; +#else + cm::bool_constant< + cm::is_iterator<decltype(std::begin( + std::declval<const Range>()))>::value && + cm::is_iterator<decltype(std::end(std::declval<const Range>()))>::value>; +#endif // checks if a type is an input range type: std::begin() and std::end() are // returning an input iterator |