Opened 6 years ago
Last modified 6 years ago
#12159 new Bugs
file_descriptor(int,flags) constructor fails
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | file_descriptor int template | Cc: |
Description
The following code fails to compile:
int fd = fileno(filename);
boost::iostreams::file_descriptor_source fd_src(
fd, boost::iostreams::file_descriptor_flags::close_handle
);
The compiler reports: ... /usr/include/boost/iostreams/device/file_descriptor.hpp:194:11: error: no matching function for call to ‘boost::iostreams::detail::path::path(boost::iostreams::file_descriptor_source* const&)’
{ open(detail::path(path), mode); }
...
Evidently the templated constructor is overriding.
Note:
See TracTickets
for help on using tickets.
To clarify, the templated constructor is being selected as the only viable overload.