$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] How can I detect if a template static member function exists?
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2016-10-16 07:16:19
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?