I'm almost certain this has been answered somewhere, but I can't find it, so I'll just ask.
Compiles fine
template <int SIZE, unsigned int NUMSYNC>
class MyClass{
private:
std::uniform_int_distribution<int> randomNumberDistribution{ 0, SIZE };
}
Does not compile (constant SIZE is not a type name)
template <int SIZE, unsigned int NUMSYNC>
class MyClass{
private:
std::uniform_int_distribution<int> randomNumberDistribution( 0, SIZE );
}
I'm trying to understand the difference and why the brace-initialization works, as opposed to the traditional one.
I'm compiling with C++14