forked from enlightenment/efl
eina-cxx: fix compilation error on clang
Summary: Fixed compilation error on clang when std::vector<char>::iterator and std::string::iterator are the same type in type_traits for contiguous traits optimization. @fix Reviewers: MagikBSD, tasn, cedric, raster, savio, woohyun Reviewed By: tasn CC: cedric Maniphest Tasks: T1328 Differential Revision: https://phab.enlightenment.org/D1004 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
9a4deeafe2
commit
f5c4481be8
|
@ -30,16 +30,22 @@ using std::false_type;
|
||||||
using std::remove_pointer;
|
using std::remove_pointer;
|
||||||
using std::remove_reference;
|
using std::remove_reference;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct indirect_is_contiguous_iterator : false_type
|
||||||
|
{};
|
||||||
|
template <>
|
||||||
|
struct indirect_is_contiguous_iterator<std::vector<char>::iterator> : std::true_type
|
||||||
|
{};
|
||||||
|
template <>
|
||||||
|
struct indirect_is_contiguous_iterator<std::vector<char>::const_iterator> : std::true_type
|
||||||
|
{};
|
||||||
|
|
||||||
template <typename T, typename Enable = void>
|
template <typename T, typename Enable = void>
|
||||||
struct is_contiguous_iterator : false_type {};
|
struct is_contiguous_iterator : indirect_is_contiguous_iterator<T> {};
|
||||||
template <>
|
template <>
|
||||||
struct is_contiguous_iterator<std::string::const_iterator> : true_type {};
|
struct is_contiguous_iterator<std::string::const_iterator> : true_type {};
|
||||||
template <>
|
template <>
|
||||||
struct is_contiguous_iterator<std::string::iterator> : true_type {};
|
struct is_contiguous_iterator<std::string::iterator> : true_type {};
|
||||||
template <>
|
|
||||||
struct is_contiguous_iterator<std::vector<char>::const_iterator> : true_type {};
|
|
||||||
template <>
|
|
||||||
struct is_contiguous_iterator<std::vector<char>::iterator> : true_type {};
|
|
||||||
|
|
||||||
template <bool, typename T, typename F>
|
template <bool, typename T, typename F>
|
||||||
struct if_c
|
struct if_c
|
||||||
|
|
Loading…
Reference in New Issue