[type_erasure] static check of concept compliance

Consider:
using any_t=any<
boost::mpl::vector<
copy_constructible<>,
incrementable<>
>
>;
struct foo{};
int main()
{
std::cout<

AMDG On 08/27/2016 12:32 PM, Joaquin M López Muñoz wrote:
Is there a (publicly available) way to determine if an argument of type U can be used to construct an any
? I'd like to have this for doing SFINAE in my any-using code.
No there isn't. The implementation of a concept is in the body of a function. I don't think there's any way to test it for compliance at compile time without creating another parallel hierarchy solely for the test. In Christ, Steven Watanabe
participants (2)
-
Joaquin M López Muñoz
-
Steven Watanabe