00001 #ifndef STATIC_CONTIANER_TEST_DUMP_H
00002
00003 #define STATIC_CONTIANER_TEST_DUMP_H
00004
00005 #include <sstream>
00006
00008 template < typename Cont >
00009 void dump( const Cont& cont ) {
00010 char fileImage1[ sizeof( Cont ) ];
00011 char fileImage2[ sizeof( Cont ) ];
00012
00013 memcpy( fileImage1, &cont, sizeof( Cont ) );
00014 memcpy( fileImage2, fileImage1, sizeof( Cont ) );
00015 Cont* dest = reinterpret_cast< Cont* >( fileImage2 );
00016 BOOST_REQUIRE( cont == *dest );
00017 }
00018
00019 template < typename ContGen >
00020 void dump() {
00021 ContGen::gen< int, 10 >::type iv;
00022 dump( iv );
00023
00024 iv.push_back( 100 );
00025 iv.push_back( 50 );
00026 dump( iv );
00027 }
00028
00029 #endif