diff --git a/include/msgpack/adaptor/cpp11/array.hpp b/include/msgpack/adaptor/cpp11/array.hpp index fe057eb3..42407fff 100644 --- a/include/msgpack/adaptor/cpp11/array.hpp +++ b/include/msgpack/adaptor/cpp11/array.hpp @@ -60,6 +60,14 @@ struct as_impl { } }; +template +struct as_impl { + static std::array as(msgpack::object const& o) { + msgpack::object* p = o.via.array.ptr; + return std::array{{p->as()}}; + } +}; + template struct as_impl { static std::array as(msgpack::object const&) { diff --git a/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp b/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp index 3aab03c8..43187a8e 100644 --- a/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp +++ b/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp @@ -37,7 +37,6 @@ namespace type { using std::tuple_element; using std::uses_allocator; using std::ignore; - using std::tie; using std::swap; template< class... Types > @@ -100,6 +99,10 @@ namespace type { ) { return std::tuple_cat(std::forward::type::base>(args)...); } + template + inline tuple tie(Args&... args) { + return tuple(args...); + } } // namespace type // --- Pack from tuple to packer stream --- diff --git a/test/msgpack_container.cpp b/test/msgpack_container.cpp index 14908e08..106a67e7 100644 --- a/test/msgpack_container.cpp +++ b/test/msgpack_container.cpp @@ -294,7 +294,7 @@ struct tr1_hash : std::tr1::hash { #include "msgpack/adaptor/tr1/unordered_map.hpp" TEST(MSGPACK_TR1, simple_buffer_tr1_unordered_map) { - typedef tr1::unordered_map, test::equal_to, test::allocator > > type; + typedef tr1::unordered_map, test::equal_to, test::allocator > > type; for (unsigned int k = 0; k < kLoop; k++) { type val1; for (unsigned int i = 0; i < kElements; i++) @@ -413,7 +413,7 @@ struct hash : std::hash { #include "msgpack/adaptor/tr1/unordered_map.hpp" TEST(MSGPACK_TR1, simple_buffer_unordered_map) { - typedef unordered_map, test::equal_to, test::allocator > > type; + typedef unordered_map, test::equal_to, test::allocator > > type; for (unsigned int k = 0; k < kLoop; k++) { type val1; for (unsigned int i = 0; i < kElements; i++) @@ -434,7 +434,7 @@ TEST(MSGPACK_TR1, simple_buffer_unordered_map) TEST(MSGPACK_TR1, simple_buffer_unordered_multimap) { - typedef unordered_multimap, test::equal_to, test::allocator > > type; + typedef unordered_multimap, test::equal_to, test::allocator > > type; for (unsigned int k = 0; k < kLoop; k++) { type val1; for (unsigned int i = 0; i < kElements; i++) {