forked from boostorg/endian
Ha! Replace invert() with reorder(). That finally feels right.
git-svn-id: http://svn.boost.org/svn/boost/sandbox/endian@74215 b8fc166d-592f-0410-95f2-cb63ce0dd405
This commit is contained in:
1 parent
a114dd72b5
commit
f243089ef4
4 files changed
+123
-125
No files matched your search
@@ -16,8 +16,8 @@
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <boost/endian/types.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/detail/lightweight_main.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
using namespace boost::endian;
|
||||
|
||||
@@ -41,14 +41,14 @@ namespace
|
||||
|
||||
int cpp_main(int, char * [])
|
||||
{
|
||||
BOOST_TEST_EQ( sizeof( header ), 16U ); // requirement for interoperability
|
||||
BOOST_STATIC_ASSERT( sizeof( header ) == 16U ); // requirement for interoperability
|
||||
|
||||
header h;
|
||||
|
||||
h.file_code = 0x04030201;
|
||||
h.file_code = 0x01020304;
|
||||
h.file_length = sizeof( header );
|
||||
h.version = -1;
|
||||
h.shape_type = 0x04030201;
|
||||
h.shape_type = 0x01020304;
|
||||
|
||||
// Low-level I/O such as POSIX read/write or <cstdio> fread/fwrite is sometimes
|
||||
// used for binary file operations when ultimate efficiency is important.
|
||||
@@ -74,5 +74,5 @@ int cpp_main(int, char * [])
|
||||
|
||||
std::cout << "created file " << filename << '\n';
|
||||
|
||||
return ::boost::report_errors();
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user