From 17384763216a067dcc979c221bee8f9e0b0ecfa4 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Wed, 30 Aug 2017 08:41:08 -0600 Subject: [PATCH] Make comparison constexpr --- include/chaiscript/chaiscript_defines.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/chaiscript/chaiscript_defines.hpp b/include/chaiscript/chaiscript_defines.hpp index ef937620..9754913f 100644 --- a/include/chaiscript/chaiscript_defines.hpp +++ b/include/chaiscript/chaiscript_defines.hpp @@ -215,7 +215,7 @@ namespace chaiscript { return t_lhs < t_rhs; } template - bool operator()(const LHS &t_lhs, const RHS &t_rhs) const noexcept { + constexpr bool operator()(const LHS &t_lhs, const RHS &t_rhs) const noexcept { return std::lexicographical_compare(t_lhs.begin(), t_lhs.end(), t_rhs.begin(), t_rhs.end()); } struct is_transparent{};