Part of: #209
The updated KeyGet* functions have not been registered in the evaluator yet, so they cannot be called internally in the enforcer.
To solve this problem, I modified numeric_type to string in exprtk_config.h, and added the ExprtkGetFunction and ExprtkGetWithPathFunction struct to implement the registration of the KeyGet* functions.
But while running CI, I encountered some error messages, one of them is that the function in exprtk cannot be overloaded. It seems that the string type cannot be overloaded in exprtk as a template type. I'm not quite sure how to fix this. Can anyone give some suggestions?
/home/runner/work/casbin-cpp/casbin-cpp/include/casbin/model/../exprtk/exprtk.hpp:13127:64: error: no match for ‘operator-’ (operand types are ‘const std::__cxx11::basic_string<char>’ and ‘const std::__cxx11::basic_string<char>’)
13127 | static inline T process(Type t1, Type t2) { return t1 - t2; }
|
Part of: #209 The updated
KeyGet*
functions have not been registered in theevaluator
yet, so they cannot be called internally in theenforcer.
To solve this problem, I modified
numeric_type
tostring
inexprtk_config.h
, and added theExprtkGetFunction
andExprtkGetWithPathFunction
struct to implement the registration of theKeyGet*
functions.But while running CI, I encountered some error messages, one of them is that the function in
exprtk
cannot be overloaded. It seems that thestring
type cannot be overloaded inexprtk
as a template type. I'm not quite sure how to fix this. Can anyone give some suggestions?Here is some error message: