*** empty log message ***

[SVN r27749]
This commit is contained in:
Thorsten Jørgen Ottosen
2005-03-21 00:01:27 +00:00
commit 5eaf3a0e88
119 changed files with 12996 additions and 0 deletions

25
test/stack_example.cpp Executable file
View File

@@ -0,0 +1,25 @@
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/assert.hpp>
#include <stack>
typedef std::stack< int*,boost::ptr_vector<int> > stack_type;
int main()
{
stack_type s;
s.push( new int(1) );
s.push( new int(2) );
s.push( new int(3) );
s.push( new int(4) );
s.push( new int(5) );
//
// Won't work since stack uses cont::value_type in the interface.
// Hence will require special adapter...if only containers
// would use reference as return types and value_type as
// argument types
//
BOOST_ASSERT( s.top() == 5 );
}