Hi,
Alot templated code looks like this:
template <typename T>
class foo
{
enum { value = <some expr with T> };
};
An example can be seen here in the prime check program and I've seen it in a Factorial implementation once too.
My question is why use a nameless enum? Is there a particular reason to this? A static const int could work as well for example?
edit:
@Benoît: Thanks for the link, it provided the insight I was looking for!