#include <sstream>
Include dependency graph for dump.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
template<typename Cont> void | dump (const Cont &cont) |
バイナリファイルへの直接書き込み・読み込みテスト | |
template<typename ContGen> void | dump () |
|
Definition at line 20 of file dump.h.
|
|
バイナリファイルへの直接書き込み・読み込みテスト
Definition at line 9 of file dump.h.
00009 { 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 } |