From 6e9206bdccda628682204fa0b35b2bf698d64295 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 30 Oct 2013 11:11:06 -0700 Subject: [PATCH] clover: Workaround compiler bug present in GCC 4.7.0-4.7.2. Variadic template aliases make these versions of GCC very confused, write down the full type spec instead. --- src/gallium/state_trackers/clover/util/range.hpp | 29 +++++++++++------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/gallium/state_trackers/clover/util/range.hpp b/src/gallium/state_trackers/clover/util/range.hpp index 151992e..cefa5b5 100644 --- a/src/gallium/state_trackers/clover/util/range.hpp +++ b/src/gallium/state_trackers/clover/util/range.hpp @@ -218,14 +218,6 @@ namespace clover { namespace detail { template using preferred_iterator_type = decltype(std::declval().begin()); - - template - using adaptor_iterator = detail::iterator_adaptor< - F, preferred_iterator_type...>; - - template - using adaptor_const_iterator = detail::iterator_adaptor< - F, preferred_iterator_type...>; } /// @@ -236,12 +228,17 @@ namespace clover { template class adaptor_range : public detail::basic_range, - detail::adaptor_iterator, - detail::adaptor_const_iterator> { + detail::iterator_adaptor< + F, detail::preferred_iterator_type...>, + detail::iterator_adaptor< + F, detail::preferred_iterator_type...> + > { public: typedef detail::basic_range, - detail::adaptor_iterator, - detail::adaptor_const_iterator + detail::iterator_adaptor< + F, detail::preferred_iterator_type...>, + detail::iterator_adaptor< + F, detail::preferred_iterator_type...> > super; template @@ -254,23 +251,23 @@ namespace clover { return f == r.f && os == r.os; } - detail::adaptor_iterator + typename super::iterator begin() { return { f, tuple::map(begins(), os) }; } - detail::adaptor_iterator + typename super::iterator end() { return { f, tuple::map(advances_by(size()), tuple::map(begins(), os)) }; } - detail::adaptor_const_iterator + typename super::const_iterator begin() const { return { f, tuple::map(begins(), os) }; } - detail::adaptor_const_iterator + typename super::const_iterator end() const { return { f, tuple::map(ends(), os) }; } -- 2.7.4