diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-06-27 13:53:59 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-06-27 13:53:59 +0200 |
commit | 3ddf5bf9914182bebc4bb2b6d64741c8246a0ca5 (patch) | |
tree | 45ec69658c5db98570e73ad459c59f4eb9a954ac | |
parent | c919a3d534068f3d51303780d0105d5571fd8317 (diff) |
Add a nop specialization for converting byte order of a single byte
-rw-r--r-- | odb/pgsql/details/endian-traits.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/odb/pgsql/details/endian-traits.hxx b/odb/pgsql/details/endian-traits.hxx index b21d51e..5e29fb8 100644 --- a/odb/pgsql/details/endian-traits.hxx +++ b/odb/pgsql/details/endian-traits.hxx @@ -29,6 +29,16 @@ namespace odb struct swap_endian; template <typename T> + struct swap_endian<T, 1> + { + static T + swap (T x) + { + return x; + } + }; + + template <typename T> struct swap_endian<T, 2> { static T |