Constrained genericity: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: .perl not needed) |
(→{{header|C++}}: lang fixed) |
||
Line 99: | Line 99: | ||
{{works with|C++11}} |
{{works with|C++11}} |
||
Uses static assertion to disallow instantiations on incorrect types |
Uses static assertion to disallow instantiations on incorrect types |
||
⚫ | |||
<lang c++> |
|||
⚫ | |||
struct can_eat //Detects presence of non-const member function void eat() |
struct can_eat //Detects presence of non-const member function void eat() |
||
{ |
{ |