add test code for template friends with template template parameters
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@733 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
812423e188
commit
b849c0261e
2 changed files with 87 additions and 16 deletions
|
@ -934,7 +934,49 @@ void DoStrongForwardReferenceTest( void )
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
struct Foo
|
||||
{
|
||||
};
|
||||
typedef Loki::StrongPtr
|
||||
<
|
||||
BaseClass, false, TwoRefCounts, DisallowConversion,
|
||||
AssertCheck, CantResetWithStrong, DeleteSingle, DontPropagateConst
|
||||
>
|
||||
Ptr;
|
||||
|
||||
bool Compare( const Ptr&, const Ptr&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void friend_handling2()
|
||||
{
|
||||
// http://sourceforge.net/tracker/index.php?func=detail&aid=1570582&group_id=29557&atid=396644
|
||||
|
||||
// friend injection
|
||||
// see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28597
|
||||
std::vector<Ptr> vec;
|
||||
std::sort( vec.begin(), vec.end(), Compare );
|
||||
std::nth_element( vec.begin(), vec.begin(), vec.end(), Compare );
|
||||
std::search( vec.begin(), vec.end(),
|
||||
vec.begin(), vec.end(), Compare );
|
||||
Ptr a, b;
|
||||
Compare( a, b );
|
||||
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29486
|
||||
BaseClass * pNull ;
|
||||
Ptr w1( new BaseClass );
|
||||
ReleaseAll( w1, pNull );
|
||||
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// $Log$
|
||||
// Revision 1.7 2006/10/17 10:09:37 syntheticpp
|
||||
// add test code for template friends with template template parameters
|
||||
//
|
||||
// Revision 1.6 2006/05/17 16:23:39 syntheticpp
|
||||
// remove gcc warnings
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue