Modify

Ticket #1671 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

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:

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

Change History

comment:1 Changed 6 years ago by turkanis

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

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]

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.