http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43813
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-04 12:00:52 UTC --- (In reply to comment #14) > Well, besides wrapping the thing in an __is_input_iterator helper. That's what I was going to suggest, possibly using an alias template: +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + private: + template<typename _InIter> + using _RequireInputerIter = typename + enable_if<is_convertible<typename + iterator_traits<_InputIterator>::iterator_category, + input_iterator_tag>::value>::type; + + public: + template<typename _InputIterator, typename = + _RequireInputIter<_InputIterator>> + deque(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } +#else