
16 Oct
2016
16 Oct
'16
11:16 a.m.
I'd like to write a trait: template<class T> struct has_content_length : std::integral_constant<bool, ...>{}; which detects whether or not a template static member function is present in T. Here's a typical T: struct X { template<bool isRequest, class Body, class Headers> static std::uint64_t content_length( message<isRequest, Body, Headers> const& m); }; How can I detect if X::content_length(m) is callable for any m of type message template?