cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f5c4481be895d5f9e2e4953bf1d90a64c9a87563

commit f5c4481be895d5f9e2e4953bf1d90a64c9a87563
Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br>
Date:   Thu Jun 12 17:34:19 2014 +0200

    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.b...@partner.samsung.com>
---
 src/bindings/eina_cxx/eina_type_traits.hh | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/bindings/eina_cxx/eina_type_traits.hh 
b/src/bindings/eina_cxx/eina_type_traits.hh
index 796a165..9e8628a 100644
--- a/src/bindings/eina_cxx/eina_type_traits.hh
+++ b/src/bindings/eina_cxx/eina_type_traits.hh
@@ -30,16 +30,22 @@ using std::false_type;
 using std::remove_pointer;
 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>
-struct is_contiguous_iterator : false_type {};
+struct is_contiguous_iterator : indirect_is_contiguous_iterator<T> {};
 template <>
 struct is_contiguous_iterator<std::string::const_iterator> : true_type {};
 template <>
 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>
 struct if_c

-- 


Reply via email to