mas-bandwidth/yojimbo

write_int macro conflict with spdlog library.

Closed this issue · 2 comments

Hello,

Using the fast C++ logging library SPDLog with yojimbo causes a minor problem on yojimbo write_int macro.

#define write_int( stream, value, min, max )

No luck, spdlog has got a write_int function, which forces us to position the call spdlog header before yojimbo header otherwise compiler vomits !

Can not we use inline functions or forceinline functions into the yojimbo namespace ?

Please, a last and small question :

I missing something about serialize_string and serialize_bytes.
I can not know in advance the size of the string/buffer when receiving.
Do I have to manipulate theses datas with a known/fixed size ?

A big thank for this library and related articles.

unfortunately macros are necessary. why not modify your version to prefix with yojimbo_write_int instead. Sorry about this. tough decision.

re. the string/bytes stuff, does not require a fixed size, but does require that you know fixed MAX size... will encode dynamic length for you automatically, as long as you respect max size known ahead of time.

Don't be sorry. No problem about your suggestion. And I understood the stuff about string/buffer size. Merci beaucoup !