[Boost-bugs] [Boost C++ Libraries] #4940: Problem with construcotr of file_descriptor_sink class.

Subject: [Boost-bugs] [Boost C++ Libraries] #4940: Problem with construcotr of file_descriptor_sink class.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-06 13:57:32


#4940: Problem with construcotr of file_descriptor_sink class.
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: turkanis
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 {{{
 $ cat test.cpp
 #include <boost/iostreams/device/file_descriptor.hpp>
 #include <boost/iostreams/stream.hpp>

 using namespace boost::iostreams;

 class fdstream : public stream<file_descriptor_sink>
 {
 public:
     fdstream(int fd): stream<file_descriptor_sink>(fd) {}
 };

 $ gcc test.cpp -o test
 /usr/include/boost/iostreams/device/file_descriptor.hpp: In constructor
 'boost::iostreams::file_descriptor_sink::file_descriptor_sink(const Path&,
 std::_Ios_Openmode) [with Path = int]':
 /usr/include/boost/iostreams/stream.hpp:130: instantiated from
 'boost::iostreams::stream<Device, Tr, Alloc>::stream(U100&, typename
 boost::disable_if<boost::is_same<U0, T>, void>::type*) [with U100 = int,
 Device = boost::iostreams::file_descriptor_sink, Tr =
 std::char_traits<char>, Alloc = std::allocator<char>]'
 test.cpp:9: instantiated from here
 /usr/include/boost/iostreams/device/file_descriptor.hpp:276: error: call
 of overloaded 'path(const int&)' is ambiguous
 /usr/include/boost/iostreams/detail/path.hpp:111: note: candidates are:
 boost::iostreams::detail::path::path(const std::wstring&) <near match>
 /usr/include/boost/iostreams/detail/path.hpp:58: note:
 boost::iostreams::detail::path::path(const
 boost::iostreams::detail::path&) <near match>
 /usr/include/boost/iostreams/detail/path.hpp:47: note:
 boost::iostreams::detail::path::path(const char*) <near match>
 /usr/include/boost/iostreams/detail/path.hpp:44: note:
 boost::iostreams::detail::path::path(const std::string&) <near match>
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4940>
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:05 UTC