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

@ -47,6 +47,7 @@ SOFTWARE.
#include "jwt/string_view.hpp"
#include "jwt/error_codes.hpp"
#include "jwt/base64.hpp"
#include "jwt/config.hpp"
namespace jwt {
@ -220,7 +221,7 @@ enum class algorithm
* Convert the algorithm enum class type to
* its stringified form.
*/
inline jwt::string_view alg_to_str(enum algorithm alg) noexcept
inline jwt::string_view alg_to_str(SCOPED_ENUM algorithm alg) noexcept
{
switch (alg) {
case algorithm::HS256: return "HS256";
@ -245,7 +246,7 @@ inline jwt::string_view alg_to_str(enum algorithm alg) noexcept
* Convert stringified algorithm to enum class.
* The string comparison is case insesitive.
*/
inline enum algorithm str_to_alg(const jwt::string_view alg) noexcept
inline SCOPED_ENUM algorithm str_to_alg(const jwt::string_view alg) noexcept
{
if (!alg.length()) return algorithm::NONE;