Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,13 @@
template<typename T> concept Eatable = requires(T t) { t.eat(); };
struct Potato { void eat(); };
struct Brick {};
template<Eatable T> class FoodBox {};
int main() {
FoodBox<Potato> lunch{};
// Following leads to compile-time error
//FoodBox<Brick> practical_joke{};
}

View file

@ -1,5 +1,5 @@
template<typename T> //Detection helper struct
struct can_eat //Detects presence of non-const member function void eat()
template<typename T> // Detection helper struct
struct can_eat // Detects presence of non-const member function void eat()
{
private:
template<typename U, void (U::*)()> struct SFINAE {};