Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • And these differences are... ? :) Commented Mar 9, 2011 at 16:16
  • 3
    @Armen: Patience, padawan, patience. Commented Mar 9, 2011 at 16:17
  • I see we meet again Mr Bond ... or shall I say Mr Voight?. You used to answer my questions on comp.lang.c++ waaay, back in the day :) Commented Nov 25, 2012 at 17:12
  • "In C++, const variables of appropriate type are integral constant expressions" - they can be, but they aren't in all cases. I guess that is the main reason for adding consexpr keyword to ISOC++11. Example: int i=0; std::cin>>i; const int I=i; int is[I]; The last command is illegal according to the standard, because I is not a static expression, however it is a constant variable. So a more correct statement would be: "In C++, const variables of appropriate type CAN BE integral constant expressions, but in C they can be never". Commented Nov 9, 2016 at 16:09