diff options
-rw-r--r-- | odb/std-map-traits.hxx | 10 | ||||
-rw-r--r-- | odb/std-set-traits.hxx | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/odb/std-map-traits.hxx b/odb/std-map-traits.hxx index dcaba3f..a30b13e 100644 --- a/odb/std-map-traits.hxx +++ b/odb/std-map-traits.hxx @@ -8,8 +8,10 @@ #include <odb/pre.hxx> #include <map> +#include <utility> // std::move #include <odb/container-traits.hxx> +#include <odb/details/config.hxx> // ODB_CXX11 namespace odb { @@ -46,7 +48,11 @@ namespace odb key_type k; value_type v; more = f.load_all (k, v); +#ifdef ODB_CXX11 + c.insert (pair_type (std::move (k), std::move (v))); +#else c.insert (pair_type (k, v)); +#endif } } @@ -104,7 +110,11 @@ namespace odb key_type k; value_type v; more = f.load_all (k, v); +#ifdef ODB_CXX11 + c.insert (pair_type (std::move (k), std::move (v))); +#else c.insert (pair_type (k, v)); +#endif } } diff --git a/odb/std-set-traits.hxx b/odb/std-set-traits.hxx index a4a5923..e6b4853 100644 --- a/odb/std-set-traits.hxx +++ b/odb/std-set-traits.hxx @@ -8,8 +8,10 @@ #include <odb/pre.hxx> #include <set> +#include <utility> // std::move #include <odb/container-traits.hxx> +#include <odb/details/config.hxx> // ODB_CXX11 namespace odb { @@ -42,7 +44,11 @@ namespace odb { value_type v; more = f.load_all (v); +#ifdef ODB_CXX11 + c.insert (std::move (v)); +#else c.insert (v); +#endif } } @@ -96,7 +102,11 @@ namespace odb { value_type v; more = f.load_all (v); +#ifdef ODB_CXX11 + c.insert (std::move (v)); +#else c.insert (v); +#endif } } |