ipkn
Joined 12 years ago
Karma
34
Submissions
8
Member since
Jan 21
Joined 12 years ago
To check whether handler is valid with given URL at compile time, `url' (string literal) argument requires in compile time and in run time. const char* value is invalid for template argument and argument of non-constexpr function cannot be constexpr value. Thus I used macro to provied `url' argument twice; in template argument through constexpr function and in argument.
I think supporting both way is better if there is a enough explanation. I don't want to drop a simpler way to do the same job.