[Boost-bugs] [Boost C++ Libraries] #7407: istream_range does not compile with wcin

Subject: [Boost-bugs] [Boost C++ Libraries] #7407: istream_range does not compile with wcin
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-22 14:23:50


#7407: istream_range does not compile with wcin
------------------------------------------------------------+---------------
 Reporter: Christopher Yeleighton <giecrilj@…> | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.52.0
 Severity: Problem | Keywords:
------------------------------------------------------------+---------------
 The following code does not compile:

 {{{#!C++
 #include <boost/range/istream_range.hpp>
 static void trigger ()
 {
 ::boost ::istream_range < int > (::std ::cin);
 ::boost ::istream_range < int > (::std ::wcin);
 }
 }}}

 Result:
 {{{
 In file included from boost.cc:1:0:
 /usr/include/boost/range/istream_range.hpp: In instantiation of
 â€˜boost::iterator_range<std::istream_iterator<Type, Elem, Traits> >
 boost::range::istream_range(std::basic_istream<Elem, Traits>&) [with Type
 = int; Elem = wchar_t; Traits = std::char_traits<wchar_t>]’:
 boost.cc:5:46: required from here
 /usr/include/boost/range/istream_range.hpp:31:46: error: no matching
 function for call to ‘std::istream_iterator<int, char,
 std::char_traits<char>, long
 int>::istream_iterator(std::basic_istream<wchar_t>&)’
 /usr/include/boost/range/istream_range.hpp:31:46: note: candidates are:
 In file included from /usr/include/c++/4.7/iterator:66:0,
                  from /usr/include/boost/range/istream_range.hpp:16,
                  from boost.cc:1:
 /usr/include/c++/4.7/bits/stream_iterator.h:72:7: note:
 std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator(const
 std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&) [with _Tp = int;
 _CharT = char; _Traits = std::char_traits<char>; _Dist = long int;
 std::istream_iterator<_Tp, _CharT, _Traits, _Dist> =
 std::istream_iterator<int, char, std::char_traits<char>, long int>]
 /usr/include/c++/4.7/bits/stream_iterator.h:72:7: note: no known
 conversion for argument 1 from ‘std::basic_istream<wchar_t>’ to ‘const
 std::istream_iterator<int, char, std::char_traits<char>, long int>&’
 /usr/include/c++/4.7/bits/stream_iterator.h:68:7: note:
 std::istream_iterator<_Tp, _CharT, _Traits,
 _Dist>::istream_iterator(std::istream_iterator<_Tp, _CharT, _Traits,
 _Dist>::istream_type&) [with _Tp = int; _CharT = char; _Traits =
 std::char_traits<char>; _Dist = long int; std::istream_iterator<_Tp,
 _CharT, _Traits, _Dist>::istream_type = std::basic_istream<char>]
 /usr/include/c++/4.7/bits/stream_iterator.h:68:7: note: no known
 conversion for argument 1 from ‘std::basic_istream<wchar_t>’ to
 â€˜std::istream_iterator<int, char, std::char_traits<char>, long
 int>::istream_type& {aka std::basic_istream<char>&}’
 /usr/include/c++/4.7/bits/stream_iterator.h:64:26: note:
 std::istream_iterator<_Tp, _CharT, _Traits, _Dist>::istream_iterator()
 [with _Tp = int; _CharT = char; _Traits = std::char_traits<char>; _Dist =
 long int]
 /usr/include/c++/4.7/bits/stream_iterator.h:64:26: note: candidate
 expects 0 arguments, 1 provided
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7407>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC