diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-15 11:51:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-15 11:51:12 +0200 |
commit | 1a11fe37115dedb973fa5f3bb7fe62de9d7bd615 (patch) | |
tree | d0ed35549c5034407a40d6a657fb2b1950ce10b2 /bdep/wrapper-traits.hxx | |
parent | ffc328ca2e7d2d86b8ca49d5e2684608eb84302a (diff) |
Workaround for few compiler warnings
Diffstat (limited to 'bdep/wrapper-traits.hxx')
-rw-r--r-- | bdep/wrapper-traits.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bdep/wrapper-traits.hxx b/bdep/wrapper-traits.hxx index 80b0cff..f4479f7 100644 --- a/bdep/wrapper-traits.hxx +++ b/bdep/wrapper-traits.hxx @@ -5,6 +5,8 @@ #ifndef BDEP_WRAPPER_TRAITS_HXX #define BDEP_WRAPPER_TRAITS_HXX +#include <cstdint> + #include <libbutl/optional.mxx> #include <odb/wrapper-traits.hxx> @@ -54,6 +56,16 @@ namespace odb return const_cast<unrestricted_wrapped_type&> (*o); } }; + + // These magic incantations are necessary to get portable generated + // code (without these because of the way GCC works uint64_t will be + // spelled as unsigned long which will break on Windows). + // + using optional_uint64_t = butl::optional<std::uint64_t>; + using optional_uint64_traits = odb::wrapper_traits<optional_uint64_t>; +#ifdef ODB_COMPILER + template class odb::wrapper_traits<optional_uint64_t>; +#endif } #endif // BDEP_WRAPPER_TRAITS_HXX |