[v3] libstdc++/14340

Douglas Gregor gregod@cs.rpi.edu
Fri May 14 05:18:00 GMT 2004


This test case in libstdc++/14340 was failing because this converting 
constructor is a bit too lenient:

  template<typename _MutableIterator>
    _Safe_iterator(const _Safe_iterator<_MutableIterator, _Sequence>& __x);

The attached patch (against gcc-3_4-branch: changelog below) tightens the 
declaration of the converting constructor so that the declaration only 
matches exactly the right types. I've only done basic testing on 
i686-pc-linux-gnu because I'm not currently set up for real testing. 

	Doug


2004-05-14  Douglas Gregor   <gregod@cs.rpi.edu>

	PR libstdc++/14340 
	* include/debug/safe_iterator.h (_Safe_iterator converting 
	constructor): Only allow declaration to instantiate when the 
	incoming _Safe_iterator has exactly the right iterator type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr14340.patch
Type: text/x-diff
Size: 1524 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040514/4d9d7f83/attachment.bin>


More information about the Libstdc++ mailing list