Ptential Fix for VS2015 compile fail #27

This commit is contained in:
Arun M 2018-10-03 22:07:08 +05:30
parent e5ecca4f38
commit 64de7b6f1d
5 changed files with 78 additions and 25 deletions

View file

@ -27,6 +27,7 @@ SOFTWARE.
#include <cassert>
#include <cstring>
#include <ostream>
#include "jwt/config.hpp"
#include "jwt/string_view.hpp"
namespace jwt {
@ -61,8 +62,7 @@ public:
public:
constexpr char at(size_t pos) const noexcept
{
assert (pos < chars_.size());
return chars_.at(pos);
return X_ASSERT(pos < chars_.size()), chars_.at(pos);
}
private:
@ -155,8 +155,7 @@ public:
public:
constexpr char at(size_t pos) const noexcept
{
assert (pos < map_.size());
return map_[pos];
return X_ASSERT(pos < map_.size()), map_[pos];
}
private: