#include <cmath> #include <gtest/gtest.h> #ifdef HAVE_CONFIG_H #include "config.h" #endif #if defined(MSGPACK_USE_BOOST) #include <boost/fusion/adapted/struct/define_struct.hpp> const double kEPS = 1e-10; BOOST_FUSION_DEFINE_STRUCT( BOOST_PP_EMPTY(), mystruct, (int, f1) (double, f2) ) TEST(MSGPACK_BOOST, fusion_pack_unpack_convert) { std::stringstream ss; mystruct val1; val1.f1 = 42; val1.f2 = 123.45; msgpack::pack(ss, val1); msgpack::unpacked ret; msgpack::unpack(ret, ss.str().data(), ss.str().size()); mystruct val2 = ret.get().as<mystruct>();
// // Matrix/instance_method_assign.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2014 Rick Yang (rick68 at gmail dot com) // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // #ifndef EIGENJS_MATRIX_INSTANCE_METHOD_ASSIGN_HPP #define EIGENJS_MATRIX_INSTANCE_METHOD_ASSIGN_HPP #include <boost/preprocessor/empty.hpp> #include "macro.hpp" namespace EigenJS { EIGENJS_INSTANCE_METHOD(Matrix, assign, { EIGENJS_MATRIX_BINARY_OPERATOR_COMMUTATIVE_CONTEXT(BOOST_PP_EMPTY()) }) } // namespace EigenJS #endif // EIGENJS_MATRIX_INSTANCE_METHOD_ASSIGN_HPP