Opened 9 years ago

Closed 9 years ago

#1671 closed Bugs (fixed)

type mismatch of buffer size parameter causes overload resolution to fail

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



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 turkanis

  • Resolution set to fixed
  • Status changed from new to closed

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]

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain turkanis.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.