Algorithm solution:
std::generate(numbers.begin(), numbers.end(), rand);Range-based for-loop solution:
for (int& x : numbers) x = rand();Why would I want to use the more verbose
std::generateover range-based for-loops in C++11?
Quick Q: Does constexpr imply inline? -- StackOverflow
Does constexpr imply inline?
My question is: does the
constexprspecifier imply theinlinespecifier in the sense that if a non-constant argument is passed to aconstexprfunction, the compiler will try to inline the function as if theinlinespecifier was put in its declaration ?Does the C++11 standard guarantee that ?

