Modify

Opened 10 years ago

Closed 9 years ago

#1671 closed Bugs (fixed)

type mismatch of buffer size parameter causes overload resolution to fail

Reported by: Jonathan Turkanis Owned by: Jonathan Turkanis
Milestone: Boost 1.36.0 Component: iostreams
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

See http://article.gmane.org/gmane.comp.lib.boost.user/33728.

Change documentation so that buffer size parameters have type int, or disable forwarding constructors when first parameter matches device type and second parameter is integral

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by Jonathan Turkanis

Resolution: fixed
Status: newclosed

I have disabled the forwarding constructors and open() overloads in detail/forward.hpp when the first template parameter is identical to the underlying device type. This is a little too broad, since it fails to check whether the remaining parameters are integral; I judged that device constructors whose first parameter is an instance of the device itself would be pretty rare.

I was able to reproduce the error with VC8.0 on a 32-bit OS with this code:

typedef stream<file_source> my_stream; my_stream s(file_source(""), (long) 100);

The modification to forward.hpp allows the above to compile.

See [46047]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonathan Turkanis.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.