add constexpr to static logging tests

This commit is contained in:
Peter Thorson
2013-08-05 08:32:28 -05:00
parent a2d92c9a21
commit eb9ab6f70f
2 changed files with 9 additions and 2 deletions

View File

@@ -44,6 +44,7 @@
#include <iostream>
#include <iomanip>
#include <websocketpp/common/cpp11.hpp>
#include <websocketpp/common/stdint.hpp>
#include <websocketpp/logger/levels.hpp>
@@ -101,7 +102,7 @@ public:
m_out->flush();
}
bool static_test(level channel) const {
_WEBSOCKETPP_CONSTEXPR_TOKEN_ bool static_test(level channel) const {
return ((channel & m_static_channels) != 0);
}

View File

@@ -30,6 +30,7 @@
#include <iostream>
#include <websocketpp/common/cpp11.hpp>
#include <websocketpp/logger/levels.hpp>
namespace websocketpp {
@@ -40,6 +41,9 @@ class stub {
public:
stub(std::ostream* out = &std::cout) {}
stub(level c, std::ostream* out = &std::cout) {}
explicit stub(std::ostream * out) {}
stub(level c, std::ostream * out) {}
_WEBSOCKETPP_CONSTEXPR_TOKEN_ stub() {}
void set_channels(level channels) {}
void clear_channels(level channels) {}
@@ -47,8 +51,10 @@ public:
void write(level channel, const std::string& msg) {}
void write(level channel, const char* msg) {}
bool static_test(level channel) const {return false;}
bool dynamic_test(level channel) {return false;}
_WEBSOCKETPP_CONSTEXPR_TOKEN_ bool static_test(level channel) const {
return false;
}
};
} // log