Specifying a concept for a type that has a member function template using Concepts Lite

Long story short, right now you (I?) have to provide a specific U: template <template <class> class HKT, class T, class U = T> concept HKTWithTemplateMemberFunctionF { return requires(HKT<T> h) { // HKT<T> is a type, h is an object h.F(std::declval<U>()) -> HKT<U>; } } since the compiler cannot prove for all types U that … Read more

void_t “can implement concepts”?

Yes, concepts lite basically dresses up SFINAE. Plus it allows deeper introspection to allow for better overloading. However that only works if the concept predicates are defined as concept bool. The improved overloading does not work with the current concept predicates, but conditional overloading can be used. Lets look how we can define predicates, constrain … Read more

Why do we require requires requires?

It is because the grammar requires it. It does. A requires constraint does not have to use a requires expression. It can use any more-or-less arbitrary boolean constant expression. Therefore, requires (foo) must be a legitimate requires constraint. A requires expression (that thing that tests whether certain things follow certain constraints) is a distinct construct; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)