aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/msg.h
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-07-03 19:37:43 -0400
committerDeterminant <ted.sybil@gmail.com>2018-07-03 19:37:43 -0400
commit2b956e784e740853a19ed8856f296a166a270e62 (patch)
treea4f7abd7bab05804c9c7bc34bbe649ac3fbbbc95 /include/salticidae/msg.h
parent0d7edf5486daf8a3bd30ca5374d0e27998a34888 (diff)
...
Diffstat (limited to 'include/salticidae/msg.h')
-rw-r--r--include/salticidae/msg.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/salticidae/msg.h b/include/salticidae/msg.h
index 62fc33b..594ac07 100644
--- a/include/salticidae/msg.h
+++ b/include/salticidae/msg.h
@@ -42,8 +42,8 @@ template<typename OpcodeType = uint8_t,
class MsgBase {
public:
using opcode_t = OpcodeType;
- static const opcode_t OPCODE_PING = PING;
- static const opcode_t OPCODE_PONG = PONG;
+ static const opcode_t OPCODE_PING;
+ static const opcode_t OPCODE_PONG;
static const size_t header_size;
private:
@@ -248,6 +248,17 @@ const size_t MsgBase<OpcodeType, _, __>::header_size =
sizeof(MsgBase<OpcodeType, _, __>) -
sizeof(MsgBase<OpcodeType, _, __>::payload) -
sizeof(MsgBase<OpcodeType, _, __>::no_payload);
+
+template<typename OpcodeType,
+ OpcodeType PING,
+ OpcodeType _>
+const OpcodeType MsgBase<OpcodeType, PING, _>::OPCODE_PING = PING;
+
+template<typename OpcodeType,
+ OpcodeType _,
+ OpcodeType PONG>
+const OpcodeType MsgBase<OpcodeType, _, PONG>::OPCODE_PONG = PONG;
+
}
#endif