diff options
author | Francisco Jerez <[email protected]> | 2013-10-30 11:11:06 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-11-04 12:12:37 -0800 |
commit | 6e9206bdccda628682204fa0b35b2bf698d64295 (patch) | |
tree | aed0a8c6c0ff9f9973b3de49fdb3a783fadc5663 /src/gallium/state_trackers/clover | |
parent | 0a2bdbb76f9fecf34c6b5fb39b60fda745440e4f (diff) |
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.
Diffstat (limited to 'src/gallium/state_trackers/clover')
-rw-r--r-- | src/gallium/state_trackers/clover/util/range.hpp | 29 |
1 files 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 151992ed8f4..cefa5b5ad17 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<typename T> using preferred_iterator_type = decltype(std::declval<T>().begin()); - - template<typename F, typename... Os> - using adaptor_iterator = detail::iterator_adaptor< - F, preferred_iterator_type<Os>...>; - - template<typename F, typename... Os> - using adaptor_const_iterator = detail::iterator_adaptor< - F, preferred_iterator_type<const Os>...>; } /// @@ -236,12 +228,17 @@ namespace clover { template<typename F, typename... Os> class adaptor_range : public detail::basic_range<adaptor_range<F, Os...>, - detail::adaptor_iterator<F, Os...>, - detail::adaptor_const_iterator<F, Os...>> { + detail::iterator_adaptor< + F, detail::preferred_iterator_type<Os>...>, + detail::iterator_adaptor< + F, detail::preferred_iterator_type<const Os>...> + > { public: typedef detail::basic_range<adaptor_range<F, Os...>, - detail::adaptor_iterator<F, Os...>, - detail::adaptor_const_iterator<F, Os...> + detail::iterator_adaptor< + F, detail::preferred_iterator_type<Os>...>, + detail::iterator_adaptor< + F, detail::preferred_iterator_type<const Os>...> > super; template<typename G, typename... Rs> @@ -254,23 +251,23 @@ namespace clover { return f == r.f && os == r.os; } - detail::adaptor_iterator<F, Os...> + typename super::iterator begin() { return { f, tuple::map(begins(), os) }; } - detail::adaptor_iterator<F, Os...> + typename super::iterator end() { return { f, tuple::map(advances_by(size()), tuple::map(begins(), os)) }; } - detail::adaptor_const_iterator<F, Os...> + typename super::const_iterator begin() const { return { f, tuple::map(begins(), os) }; } - detail::adaptor_const_iterator<F, Os...> + typename super::const_iterator end() const { return { f, tuple::map(ends(), os) }; } |