Thursday, November 28, 2013

FeedaMail: Comments for Sutter’s Mill

feedamail.com Comments for Sutter's Mill

Comment on Visual Studio 2013 RC is now available by mathlasse

This constexpr code does not compiled in Visual Studio 2013 version 12.0.21005.1 REL

#include

constexpr int factorial(int n)
{
return n <= 1 ? 1 : (n * factorial(n – 1));
}

int main(void)
{
const int fact_three = factorial(3);
std::cout << fact_three << std::endl;
return 0;
}

Read More »

Comment on Visual Studio 2013 RC is now available by Herb Sutter

@Mathlasse: VS 2013 doesn’t have constexpr. However, the November 2013 CTP does support constexpr on nonmember functions and this code compiles fine with the CTP.

Read More »
 
Delievered to you by Feedamail.
Unsubscribe

No comments:

Post a Comment