6 #include <boost/unordered_map.hpp>
10 template <
typename T1>
13 for (
auto const&
x : map) {
14 dictionnary[
x.first] =
x.second;
19 template <
typename T1>
20 std::map<std::string, T1>
copy(
const std::map<std::string, T1>& map) {
21 std::map<std::string, T1> out = map;
25 template <
typename T1>
27 const boost::unordered_map<std::string, T1>& obj) {
41 std::string, double, std::less<std::string>,
42 std::allocator<std::pair<const std::string, double> >,
50 bp::def(
"std_map_to_dict", std_map_to_dict<double>);
51 bp::def(
"copy", copy<double>);
52 bp::def(
"copy_boost", copy_boost<int>);