Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include ordering results in compilation errors #249

Closed
davidchappelle opened this issue Mar 25, 2015 · 29 comments
Closed

Include ordering results in compilation errors #249

davidchappelle opened this issue Mar 25, 2015 · 29 comments

Comments

@davidchappelle
Copy link

Here is a small sample program that shows how include ordering can result in a significant amount of compiler errors. Forcing a strict ordering on includes seems to be a very poor approach:

#include <msgpack_fwd.hpp>

enum class color : int 
{
    red,
    green,
    blue
};

#include <msgpack/object.hpp>
MSGPACK_ADD_ENUM(color);
//#include <msgpack/object.hpp>

#include <msgpack.hpp>

int main(int argc, char** argv)
{
    msgpack::object o(color::red);
    return 0;
}

If you compile this program you will get the following output. Swapping out the msgpack/object.hpp includes will get rid of the errors.

dchappelle@orion:build$ g++ -I ../third-party/msgpack-c/include -std=c++11 ../main.cpp -o main
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp: In instantiation of ‘msgpack::v1::object::object(const T&) [with T = color]’:
../main.cpp:18:33:   required from here
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: error: no matching function for call to ‘operator<<(msgpack::v1::object&, const color&)’
     msgpack::operator<<(*this, v);
                                 ^
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note: candidates are:
../third-party/msgpack-c/include/msgpack/object.hpp:276:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const T&)
 inline void operator<< (msgpack::object::with_zone& o, const T& v)
             ^
../third-party/msgpack-c/include/msgpack/object.hpp:276:13: note:   template argument deduction/substitution failed:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
../third-party/msgpack-c/include/msgpack/object.hpp:199:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const msgpack::v1::object&)
 inline void operator<< (msgpack::object::with_zone& o, const msgpack::object& v)
             ^
../third-party/msgpack-c/include/msgpack/object.hpp:199:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/object.hpp:269:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const msgpack::v1::object::with_zone&)
 inline void operator<< (msgpack::object::with_zone& o, const msgpack::object::with_zone& v)
             ^
../third-party/msgpack-c/include/msgpack/object.hpp:269:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/object.hpp:564:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const msgpack::v1::object&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object& v)
                                 ^
../third-party/msgpack-c/include/msgpack/object.hpp:564:33: note:   template argument deduction/substitution failed:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
../third-party/msgpack-c/include/msgpack/object.hpp:631:26: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const msgpack::v1::object::with_zone&)
 msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object::with_zone& v)
                          ^
../third-party/msgpack-c/include/msgpack/object.hpp:631:26: note:   template argument deduction/substitution failed:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/object.hpp:23:0,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/pack.hpp:144:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const T&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const T& v)
                                 ^
../third-party/msgpack-c/include/msgpack/pack.hpp:144:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:141:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, char)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, char v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:141:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:146:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, signed char)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, signed char v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:146:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:150:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, short int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, signed short v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:150:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:154:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, signed int v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:154:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:158:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, long int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, signed long v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:158:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:162:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, long long int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, signed long long v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:162:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:167:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, unsigned char)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, unsigned char v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:167:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:171:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, short unsigned int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, unsigned short v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:171:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:175:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, unsigned int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, unsigned int v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:175:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:179:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, long unsigned int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, unsigned long v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:179:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:183:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, long long unsigned int)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, unsigned long long v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:183:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:23:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:5,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:187:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, char)
 inline void operator<< (msgpack::object& o, char v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:187:13: note:   no known conversion for argument 2 from ‘const color’ to ‘char’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:191:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, signed char)
 inline void operator<< (msgpack::object& o, signed char v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:191:13: note:   no known conversion for argument 2 from ‘const color’ to ‘signed char’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:203:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, short int)
 inline void operator<< (msgpack::object& o, signed short v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:203:13: note:   no known conversion for argument 2 from ‘const color’ to ‘short int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:215:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, int)
 inline void operator<< (msgpack::object& o, signed int v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:215:13: note:   no known conversion for argument 2 from ‘const color’ to ‘int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:227:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, long int)
 inline void operator<< (msgpack::object& o, signed long v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:227:13: note:   no known conversion for argument 2 from ‘const color’ to ‘long int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:239:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, long long int)
 inline void operator<< (msgpack::object& o, signed long long v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:239:13: note:   no known conversion for argument 2 from ‘const color’ to ‘long long int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:251:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, unsigned char)
 inline void operator<< (msgpack::object& o, unsigned char v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:251:13: note:   no known conversion for argument 2 from ‘const color’ to ‘unsigned char’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:254:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, short unsigned int)
 inline void operator<< (msgpack::object& o, unsigned short v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:254:13: note:   no known conversion for argument 2 from ‘const color’ to ‘short unsigned int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:257:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, unsigned int)
 inline void operator<< (msgpack::object& o, unsigned int v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:257:13: note:   no known conversion for argument 2 from ‘const color’ to ‘unsigned int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:260:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, long unsigned int)
 inline void operator<< (msgpack::object& o, unsigned long v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:260:13: note:   no known conversion for argument 2 from ‘const color’ to ‘long unsigned int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:263:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, long long unsigned int)
 inline void operator<< (msgpack::object& o, unsigned long long v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:263:13: note:   no known conversion for argument 2 from ‘const color’ to ‘long long unsigned int’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:268:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, char)
 inline void operator<< (msgpack::object::with_zone& o, char v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:268:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:272:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, signed char)
 inline void operator<< (msgpack::object::with_zone& o, signed char v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:272:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:275:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, short int)
 inline void operator<< (msgpack::object::with_zone& o, signed short v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:275:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:278:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, int)
 inline void operator<< (msgpack::object::with_zone& o, signed int v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:278:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:281:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, long int)
 inline void operator<< (msgpack::object::with_zone& o, signed long v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:281:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:284:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const long long int&)
 inline void operator<< (msgpack::object::with_zone& o, const signed long long& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:284:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:288:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, unsigned char)
 inline void operator<< (msgpack::object::with_zone& o, unsigned char v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:288:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:291:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, short unsigned int)
 inline void operator<< (msgpack::object::with_zone& o, unsigned short v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:291:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:294:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, unsigned int)
 inline void operator<< (msgpack::object::with_zone& o, unsigned int v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:294:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:297:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, long unsigned int)
 inline void operator<< (msgpack::object::with_zone& o, unsigned long v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:297:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:300:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const long long unsigned int&)
 inline void operator<< (msgpack::object::with_zone& o, const unsigned long long& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/int.hpp:300:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:2:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/bool.hpp:37:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const bool&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const bool& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/bool.hpp:37:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:2:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/bool.hpp:44:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, bool)
 inline void operator<< (msgpack::object& o, bool v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/bool.hpp:44:13: note:   no known conversion for argument 2 from ‘const color’ to ‘bool’
../third-party/msgpack-c/include/msgpack/adaptor/bool.hpp:50:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, bool)
 inline void operator<< (msgpack::object::with_zone& o, bool v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/bool.hpp:50:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:3:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:32:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const char*)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const char* v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:32:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:3:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:40:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const char*)
 inline void operator<< (msgpack::object::with_zone& o, const char* v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:40:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:50:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, const char*)
 inline void operator<< (msgpack::object& o, const char* v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:50:13: note:   no known conversion for argument 2 from ‘const color’ to ‘const char*’
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:59:24: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, char*)
 inline packer<Stream>& operator<< (packer<Stream>& o, char* v)
                        ^
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:59:24: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:3:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:64:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, char*)
 inline void operator<< (object::with_zone& o, char* v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:64:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:69:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, char*)
 inline void operator<< (object& o, char* v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/char_ptr.hpp:69:13: note:   no known conversion for argument 2 from ‘const color’ to ‘char*’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:4:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/deque.hpp:46:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::deque<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::deque<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/deque.hpp:46:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:4:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/deque.hpp:58:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::deque<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::deque<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/deque.hpp:58:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:87:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_int8&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_int8& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:87:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:91:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_int16&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_int16& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:91:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:95:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_int32&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_int32& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:95:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:99:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_int64&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_int64& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:99:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:104:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_uint8&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_uint8& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:104:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:108:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_uint16&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_uint16& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:108:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:112:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_uint32&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_uint32& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:112:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:116:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const fix_uint64&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::fix_uint64& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:116:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:5:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:120:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_int8)
 inline void operator<< (msgpack::object& o, type::fix_int8 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:120:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_int8 {aka msgpack::v1::type::fix_int<signed char>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:132:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_int16)
 inline void operator<< (msgpack::object& o, type::fix_int16 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:132:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_int16 {aka msgpack::v1::type::fix_int<short int>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:144:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_int32)
 inline void operator<< (msgpack::object& o, type::fix_int32 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:144:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_int32 {aka msgpack::v1::type::fix_int<int>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:156:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_int64)
 inline void operator<< (msgpack::object& o, type::fix_int64 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:156:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_int64 {aka msgpack::v1::type::fix_int<long int>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:169:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_uint8)
 inline void operator<< (msgpack::object& o, type::fix_uint8 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:169:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_uint8 {aka msgpack::v1::type::fix_int<unsigned char>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:172:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_uint16)
 inline void operator<< (msgpack::object& o, type::fix_uint16 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:172:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_uint16 {aka msgpack::v1::type::fix_int<short unsigned int>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:175:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_uint32)
 inline void operator<< (msgpack::object& o, type::fix_uint32 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:175:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_uint32 {aka msgpack::v1::type::fix_int<unsigned int>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:178:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::fix_uint64)
 inline void operator<< (msgpack::object& o, type::fix_uint64 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:178:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::fix_uint64 {aka msgpack::v1::type::fix_int<long unsigned int>}’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:182:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_int8)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_int8 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:182:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:185:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_int16)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_int16 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:185:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:188:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_int32)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_int32 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:188:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:191:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_int64)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_int64 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:191:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:195:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_uint8)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_uint8 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:195:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:198:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_uint16)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_uint16 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:198:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:201:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_uint32)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_uint32 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:201:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:204:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::fix_uint64)
 inline void operator<< (msgpack::object::with_zone& o, type::fix_uint64 v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/fixint.hpp:204:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:6:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:50:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const float&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const float& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:50:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:6:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:75:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const double&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const double& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:75:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:6:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:82:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, float)
 inline void operator<< (msgpack::object& o, float v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:82:13: note:   no known conversion for argument 2 from ‘const color’ to ‘float’
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:88:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, double)
 inline void operator<< (msgpack::object& o, double v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:88:13: note:   no known conversion for argument 2 from ‘const color’ to ‘double’
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:94:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, float)
 inline void operator<< (msgpack::object::with_zone& o, float v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:94:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:97:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, double)
 inline void operator<< (msgpack::object::with_zone& o, double v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/float.hpp:97:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:8:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/list.hpp:46:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::list<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::list<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/list.hpp:46:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:8:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/list.hpp:58:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::list<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::list<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/list.hpp:58:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:9:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:66:33: note: template<class Stream, class K, class V> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const msgpack::v1::type::assoc_vector<K, V>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::assoc_vector<K,V>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:66:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:9:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:79:13: note: template<class K, class V> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const msgpack::v1::type::assoc_vector<K, V>&)
 inline void operator<< (msgpack::object::with_zone& o, const type::assoc_vector<K,V>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:79:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:9:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:126:33: note: template<class Stream, class K, class V> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::map<K, V>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::map<K,V>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:126:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:9:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:139:13: note: template<class K, class V> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::map<K, V>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::map<K,V>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:139:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:9:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:180:33: note: template<class Stream, class K, class V> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::multimap<K, V>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::multimap<K,V>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:180:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:9:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:193:13: note: template<class K, class V> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::multimap<K, V>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::multimap<K,V>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/map.hpp:193:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/msgpack_tuple.hpp:26:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:18,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp:123:32: note: template<class Stream, class ... Args> const msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const msgpack::v1::type::tuple<Args ...>&)
 const msgpack::packer<Stream>& operator<< (
                                ^
../third-party/msgpack-c/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp:123:32: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/adaptor/msgpack_tuple.hpp:26:0,
                 from ../third-party/msgpack-c/include/msgpack/type.hpp:18,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp:199:13: note: template<class ... Args> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const msgpack::v1::type::tuple<Args ...>&)
 inline void operator<< (
             ^
../third-party/msgpack-c/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp:199:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:10:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/nil.hpp:42:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const msgpack::v1::type::nil&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const type::nil&)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/nil.hpp:42:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:10:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/nil.hpp:48:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, msgpack::v1::type::nil)
 inline void operator<< (msgpack::object& o, type::nil)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/nil.hpp:48:13: note:   no known conversion for argument 2 from ‘const color’ to ‘msgpack::v1::type::nil’
../third-party/msgpack-c/include/msgpack/adaptor/nil.hpp:53:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::nil)
 inline void operator<< (msgpack::object::with_zone& o, type::nil v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/nil.hpp:53:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:11:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/pair.hpp:40:33: note: template<class Stream, class T1, class T2> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::pair<_Tp1, _Tp2>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::pair<T1, T2>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/pair.hpp:40:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:11:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/pair.hpp:49:13: note: template<class T1, class T2> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::pair<_T1, _T2>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::pair<T1, T2>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/pair.hpp:49:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:12:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/raw.hpp:76:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const msgpack::v1::type::raw_ref&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::type::raw_ref& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/raw.hpp:76:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:12:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/raw.hpp:83:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, const msgpack::v1::type::raw_ref&)
 inline void operator<< (msgpack::object& o, const msgpack::type::raw_ref& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/raw.hpp:83:13: note:   no known conversion for argument 2 from ‘const color’ to ‘const msgpack::v1::type::raw_ref&’
../third-party/msgpack-c/include/msgpack/adaptor/raw.hpp:90:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const msgpack::v1::type::raw_ref&)
 inline void operator<< (msgpack::object::with_zone& o, const msgpack::type::raw_ref& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/raw.hpp:90:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:13:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:47:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::set<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::set<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:47:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:13:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:59:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::set<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::set<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:59:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:13:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:97:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::multiset<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::multiset<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:97:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:13:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:109:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::multiset<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::multiset<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/set.hpp:109:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:14:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/string.hpp:48:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const string&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::string& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/string.hpp:48:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:14:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/string.hpp:56:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const string&)
 inline void operator<< (msgpack::object::with_zone& o, const std::string& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/string.hpp:56:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
../third-party/msgpack-c/include/msgpack/adaptor/string.hpp:66:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, const string&)
 inline void operator<< (msgpack::object& o, const std::string& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/string.hpp:66:13: note:   no known conversion for argument 2 from ‘const color’ to ‘const string& {aka const std::basic_string<char>&}’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:15:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/vector.hpp:50:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::vector<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::vector<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/vector.hpp:50:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:15:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/vector.hpp:62:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::vector<_RealType>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::vector<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/vector.hpp:62:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:16:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/vector_bool.hpp:46:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::vector<bool>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::vector<bool>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/vector_bool.hpp:46:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:16:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/vector_bool.hpp:56:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::vector<bool>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::vector<bool>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/vector_bool.hpp:56:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:17:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/vector_char.hpp:50:33: note: template<class Stream> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::vector<char>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::vector<char>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/vector_char.hpp:50:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:17:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/vector_char.hpp:59:13: note: void msgpack::v1::operator<<(msgpack::v1::object&, const std::vector<char>&)
 inline void operator<< (msgpack::object& o, const std::vector<char>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/vector_char.hpp:59:13: note:   no known conversion for argument 2 from ‘const color’ to ‘const std::vector<char>&’
../third-party/msgpack-c/include/msgpack/adaptor/vector_char.hpp:67:13: note: void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::vector<char>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::vector<char>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/vector_char.hpp:67:13: note:   no known conversion for argument 1 from ‘msgpack::v1::object’ to ‘msgpack::v1::object::with_zone&’
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:28:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array.hpp:50:33: note: template<class Stream, class T, long unsigned int N> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::array<_Tp, _Nm>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::array<T, N>& v) {
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array.hpp:50:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:28:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array.hpp:58:13: note: template<class T, long unsigned int N> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::array<_Tp, _Nm>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::array<T, N>& v) {
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array.hpp:58:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:29:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array_char.hpp:51:33: note: template<class Stream, long unsigned int N> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::array<char, N>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::array<char, N>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array_char.hpp:51:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:29:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array_char.hpp:61:13: note: template<long unsigned int N> void msgpack::v1::operator<<(msgpack::v1::object&, const std::array<char, N>&)
 inline void operator<< (msgpack::object& o, const std::array<char, N>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array_char.hpp:61:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   mismatched types ‘const std::array<char, N>’ and ‘const color’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:29:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array_char.hpp:70:13: note: template<long unsigned int N> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::array<char, N>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::array<char, N>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/array_char.hpp:70:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:30:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/forward_list.hpp:46:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::forward_list<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::forward_list<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/forward_list.hpp:46:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:30:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/forward_list.hpp:55:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::forward_list<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::forward_list<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/forward_list.hpp:55:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:31:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/tuple.hpp:61:39: note: template<class Stream, class ... Args> const msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::tuple<_Elements ...>&)
 inline const msgpack::packer<Stream>& operator<< (
                                       ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/tuple.hpp:61:39: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:31:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/tuple.hpp:138:13: note: template<class ... Args> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::tuple<_Elements ...>&)
 inline void operator<< (
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/tuple.hpp:138:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:32:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:48:33: note: template<class Stream, class K, class V> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::unordered_map<K, V>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::unordered_map<K,V>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:48:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:32:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:61:13: note: template<class K, class V> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::unordered_map<K, V>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::unordered_map<K,V>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:61:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:32:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:102:33: note: template<class Stream, class K, class V> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::unordered_multimap<K, V>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::unordered_multimap<K,V>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:102:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:32:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:115:13: note: template<class K, class V> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::unordered_multimap<K, V>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::unordered_multimap<K,V>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_map.hpp:115:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:33:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:47:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::unordered_set<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::unordered_set<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:47:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:33:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:59:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::unordered_set<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::unordered_set<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:59:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:33:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:97:33: note: template<class Stream, class T> msgpack::v1::packer<Stream>& msgpack::v1::operator<<(msgpack::v1::packer<Stream>&, const std::unordered_multiset<T>&)
 inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const std::unordered_multiset<T>& v)
                                 ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:97:33: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   ‘msgpack::v1::object’ is not derived from ‘msgpack::v1::packer<Stream>’
     msgpack::operator<<(*this, v);
                                 ^
In file included from ../third-party/msgpack-c/include/msgpack/type.hpp:33:0,
                 from ../third-party/msgpack-c/include/msgpack/object.hpp:710,
                 from ../main.cpp:2:
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:109:13: note: template<class T> void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, const std::unordered_multiset<T>&)
 inline void operator<< (msgpack::object::with_zone& o, const std::unordered_multiset<T>& v)
             ^
../third-party/msgpack-c/include/msgpack/adaptor/cpp11/unordered_set.hpp:109:13: note:   template argument deduction/substitution failed:
In file included from ../main.cpp:2:0:
../third-party/msgpack-c/include/msgpack/object.hpp:491:33: note:   cannot convert ‘*(msgpack::v1::object*)this’ (type ‘msgpack::v1::object’) to type ‘msgpack::v1::object::with_zone&’
     msgpack::operator<<(*this, v);
                                 ^
@redboltz
Copy link
Contributor

Unfortunately, msgpack-c requires correct including order. It is because in order to achieve API versioning. See https://github.com/msgpack/msgpack-c/wiki/cpp_versioning and #135 https://github.com/msgpack/msgpack-c/wiki/cpp_packer#packing-enums

msgpack-c used to depends on ADL, thanks to two phase name lookup caused by ADL, the overloding functions' point of instanciation is delayed. However, ADL cannot work well with API versioning. Because API versioning requires namespace qualification.

We've made the decision that API-versioning should be added even though including order limitation is introduced.

As I wrote above, I prepared some documents on wiki and examples. But the documents wrote only about the order of msgpack_fwd.hpp and msgpack.hpp. Because many users only includes that two files. In your case, you include object.hpp directly. I think that I should write more about include files in the documentation.

@davidchappelle
Copy link
Author

I think I have another problem with this. I have a project that includes msgpack.hpp in many different header files. The problem is that as soon as I have any inline code in my common header files that needs msgpack.hpp rather than msgpack_fwd.hpp it forces me to have to include msgpack.hpp in a header file. On a larger project where include chains are deep this becomes very difficult to manage. What is the recommended strategy for including msgpack_fwd.hpp and msgpack.hpp? Does this mean that I am now forced to not inline code in these cases?

I have another third-party header only library that depends on mspack-c. So now I am forced to include msgpack.hpp in header files. So now I have to worry about these things getting included in the right order so that one of them doesn't introduce a msgpack.hpp include too early?

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I understand your situation. I considered that how to solve the issue. I've sent the PR #261 to minimize dependency to object.hpp. I believe that a header only library that uses msgpack-c need to include only msgpack_fwd.hpp when the PR is applied.

Could you get the branch and test it?

After I've created the PR, I've noticed that I had ought to name as follows:

msgpack_fwd.hpp -> msgpack.hpp
msgpack.hpp -> msgpack_impl.hpp (or similar)

However, it's too late...

Could you create workaround directory and set it to earlier include search path as folows?

mkdir workaround

Place the following files in workaround directory:

workaround/msgpack.hpp
workaround/msgpack_impl.hpp

Each file has the following contents:

workaround/msgpack.hpp

#ifndef WORKAROUND_MSGPACK_HPP
#define WORKAROUND_MSGPACK_HPP
#include "path_to_msgpack/include/msgpack_fwd.hpp"
#endif

workaround/msgpack_impl.hpp

#ifndef WORKAROUND_MSGPACK_IMPL_HPP
#define WORKAROUND_MSGPACK_IMPL_HPP
#include "path_to_msgpack/include/msgpack.hpp"
#endif
g++ -Iworkaround -Ipath_to_msgpack/include your_program.cpp

[NOTE: left path has higher priority]

msgpack-c never include msgpack.hpp internally. So this workaround should work.

Now, the library header files don't include path_to_msgpack/include/msgpack.hpp.
If the library includes path_to_msgpack/include/msgpack/object.hpp directly, the same workaround should work. Because object.hpp is included only from path_to_msgpack/include/msgpack.hpp.

Finally, include workaround/msgpack_impl.hpp from your_program.cpp after other headers inclusion.

your_program.cpp

#include <third_party_header1.hpp>
#include <third_party_header2.hpp>
#include <your_header1.hpp>
#include <your_header2.hpp>
// ...
#include <msgpack_impl.hpp>

Mechanism

The template versions of packing/converting operators are defined in object.hpp.
See https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/object.hpp#L94

In order to dispatch to the apropriate overload of the packing/converting operator, all overloads should be declared before invoking them. So I created *_fwd.hpp files and include them from object.hpp. It works well. To support user defined types, I created msgpack_fwd.hpp. It originally contains a minimal information to declare the operators for user defined types. But now, msgpack_fwd.hpp has a most of msgpack function except object.hpp.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I wrote a workaround approach above.

Here is a straight forward approach. After applying #261, libraries that use msgpack-c replace msgpack.hpp with msgpack_fwd.hpp when the libraries support msgpack-c 1.0.0 or later.

Both workaround approach and straight forward approach work fine in my small example. I believe that it should work well on your project. Please let me know your result.

@davidchappelle
Copy link
Author

I seem to still have a problem with cases where msgpack::type::nil is used within header files:

In file included from /home/dchappelle/projects/msgpack-rpc-boost/src/msgpack/rpc/future.h:27:0,
                 from /home/dchappelle/projects/msgpack-rpc-boost/src/msgpack/rpc/exception.h:22,
                 from /home/dchappelle/projects/msgpack-rpc-boost/src/msgpack/rpc/session.h:24,
                 from /home/dchappelle/projects/msgpack-rpc-boost/src/msgpack/rpc/client.h:22,
                 from /home/dchappelle/projects/msgpack-rpc-boost/src/msgpack/rpc/client.cc:18:
/usr/local/include/msgpack/adaptor/nil.hpp: In function ‘void msgpack::v1::operator<<(msgpack::v1::object::with_zone&, msgpack::v1::type::nil)’:
/usr/local/include/msgpack/adaptor/nil.hpp:54:29: error: invalid static_cast from type ‘msgpack::v1::object::with_zone’ to type ‘msgpack::v1::object&’
     { static_cast<object&>(o) << v; }
```                             ^

Seems that object_fwd.hpp is not enough here because it only provides a forward declaration for object::with_zone.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

Thank you for reporting! I will check it soon.

@davidchappelle
Copy link
Author

Looks like moving object::with_zone into object_fwd.hpp is the right thing to do.

@davidchappelle
Copy link
Author

I am also finding that I need to now include msgpack/adaptor/nil.hpp into header files. Is this ok?

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I've just committed redboltz@a35acc6

@davidchappelle
Copy link
Author

Ok cool. I also see that unpack.hpp includes object.hpp. So if I declare a msgpack::unpacker as a class member variable I am now pulling in object.hpp.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I also see that unpack.hpp includes object.hpp.

It has been fixed in #261
https://github.com/msgpack/msgpack-c/pull/261/files#diff-f5a1fe6bd74ff671f35f7e74e7c6f734R22

@davidchappelle
Copy link
Author

I almost feel like all of this could have been avoided if we had taken an approach similar to std::hash. For example, if you want to define a hash operator for a custom type:

namespace std {
    template<> struct hash<services::service_info>
    {   
        size_t operator()(const services::service_info& info) const
        {
            return hash<services::service_id>()(info.id());
        }
    };  
} // namespace std

We could have taken the very same approach with msgpack-c and defined operator<< and operator>> in the same manner. Then we wouldn't have all of these include ordering constraints.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I am also finding that I need to now include msgpack/adaptor/nil.hpp into header files. Is this ok?

Yes, it is. Or you can include msgpack/type.hpp.
It contains nil.hpp
https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/type.hpp

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

We could have taken the very same approach with msgpack-c and defined operator<< and operator>> in the same manner. Then we wouldn't have all of these include ordering constraints.

It seems to be excellent idea!!
I've checked it quickly.

msgpack-c 0.5.9 and older version uses ADL and function (operator<< and >> ) overloading in order to appropriate dispatch. It cannot work well with API versioning.

So I introduced include ordering approach. It solves both appropriate dispatch and API versioning. However, include ordering is not easy to use. I thought that we need to accept that inconvenience.

http://melpon.org/wandbox/permlink/Xc5K9CuFPsZzCEhO
User defined overloads must be placed prior to the template definition. (See line 34)

Using function template (operator<< and >>) specialization instead of overloading solves both appropriate dispath and API versioning. And there is no include ordering restriction.

http://melpon.org/wandbox/permlink/sTVu0SAHTTXbPtUJ

I will apply your approach to msgpack-c.

It could be a pretty big update. I need time to implement and test them. But I will do it as soon as possible.

Thank you @davidchappelle, I appreciate your help.

@davidchappelle
Copy link
Author

That is awesome. Let me know if there is anything I can do to help test.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

Thanks.

I meet with a problem.

Packing function templates cannot be specialized. They already have a template parameter Stream. Stream should be kept as the template parameter. So I need function template partial specialization.

template <typename Stream>
inline msgpack::packer<Stream>& operator<< <UserType> (msgpack::packer<Stream>& o, const UserType& v) {
...
}

However, C++ cannot allow the function template partial specialization.

Here is a proof of concept codes:

When the first parameter of operator<< is not a template, it works as expected:
http://melpon.org/wandbox/permlink/gERsOtSxt4toO8ya

When I try to partial specialization, it fails to compile. See line 94
http://melpon.org/wandbox/permlink/ITL3fvUdp0JPULxz
[Note: You can switch template or no_template in line 3]

When I use function template overloads instead of partial specialization, user defined version is not called.
http://melpon.org/wandbox/permlink/PZEWcqki1ncPFiAv

When I back to the include ordering approach, user defined version is called as expected. See line 34.
http://melpon.org/wandbox/permlink/GuGviDTKXTwXVk0r

Hmm... I couldn't find a good solution, so far.
Any ideas?

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I think that using a class template instead of a function template is basic approach to solve these kinds of C++ restriction.
See http://melpon.org/wandbox/permlink/ZQgEzoLaQRcHhz0a

Packing/Converting functions could be a functors. At least they don't need to be operators. I think that it is a good approach for the future. But it could break existing libraries that use msgpack-c if they define user defined Packing/Converting functions.

@davidchappelle
Copy link
Author

Here is a solution I think.

http://melpon.org/wandbox/permlink/PJFfqdbPAcIhcrtl

@davidchappelle
Copy link
Author

The functor approach you posted above is pretty much what I was originally thinking. However, it seems that no matter which path we take we will introduce a breakage in existing libraries. if we are going to break it then I would prefer to take the functor approach although I believe that the solution I posted above will also work.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

http://melpon.org/wandbox/permlink/PJFfqdbPAcIhcrtl
outputs

v2::operator<<(packer<Stream>&, T&)
v2::operator<<(packer<Stream>&, T&)

Expected output is

OL::operator<<(packer<Stream>&, T&)
v2::operator<<(packer<Stream>&, T&)

Because user defined version that outputs start with "OL" should be called.

To create perma link on wandbox,
First press Run button, then press Share This Code. You need to do this routine when you update the code.

@davidchappelle
Copy link
Author

Ok. So I think that the only real viable solution here is going to be to use functor approach.

@redboltz
Copy link
Contributor

redboltz commented Apr 1, 2015

I prefer to functor approach too. I will replace adaptors implementation from operators(functions) to functors.

At first, you have pointed out two problems.

  1. Keeping include order is difficult to maintain.
  2. Third party libraries that include msgpack.hpp is not easy to update. It makes the first problem more difficult.

I think that the first problem is more important.
msgpack-c 0.5.9 -> 1.0.0 is MAJOR update. It includes breaking changes. Third party libraries need to update, more or less. But if we apply the functor approach, third party libraries modification would be minimized.

I will create the new developping branch to implement functor approach. I will discuss with @nobu-k, another maintainer, which version should we include the functor approach.

@davidchappelle
Copy link
Author

Thank you for your help on this issue. Let me know how things progress and if I can help out in any way.

@redboltz
Copy link
Contributor

redboltz commented Apr 2, 2015

I've just finished implementing the functor based approach. It is #262.
Could you check it on your project?

@davidchappelle
Copy link
Author

Just on my way in to Toronto. I'll be able to start checking it in a few hours.

@davidchappelle
Copy link
Author

Tested agaisnt msgpack-rpc-boost and it worked perfectly fine. Now testing against a larger project that uses more of the custom stream serialization/de-serialization.

@davidchappelle
Copy link
Author

Integrated very well with the larger project.

@redboltz
Copy link
Contributor

redboltz commented Apr 3, 2015

Thank you for testing!

I am writing the document about this new approach. https://github.com/redboltz/msgpack-c/wiki
I discussed with @nobu-k, and we decide to release the fuctor version as 1.1.0.

@redboltz
Copy link
Contributor

redboltz commented Apr 3, 2015

msgpack-c 1.1.0 has been released just now. The issue is fixed. @davidchappelle, thank you for your help. I thought that API versioning and avoiding include ordering are trade off. But it is not true. Both goals are has been archieved now. I believe that it is one of a great msgpack-c improvement.
https://github.com/msgpack/msgpack-c/releases/tag/cpp-1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants