-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
I'm trying to build a msgpack-only application, but I get build errors from not having RapidJson installed.
I believe it's from here: https://github.com/ecorm/cppwamp/blob/master/cppwamp/include/cppwamp/internal/client.hpp#L23-L24
because client codec is resolved as so:
cppwamp/cppwamp/include/cppwamp/internal/client.hpp
Lines 783 to 793 in 6defeb0
switch (codecId) | |
{ | |
case CodecId::json: | |
return Client<Json, Transport>::create(std::move(trn)); | |
case CodecId::msgpack: | |
return Client<Msgpack, Transport>::create(std::move(trn)); | |
default: | |
assert(false && "Unexpected CodecId"); | |
} |
I'd prefer not to depend on RapidJson when I'm not using JSON serialization.
ConnectorList
destroys all static type information on the Connector
s holding the CodecId
s, so what do you think of making CodecId
slightly fatter, perhaps with a virtual method for creating the correct client?