title: C++ constexpr error statement showing error
body: <p>Please help me with this error.</p>
  
  <p>I am trying to make a sample that explains constexpr keyword in c++. I am using Visual Studio 2013.
  Following is the code of my cpp file.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdexcept&gt;
  
  const int sampleconstant = 5;
  
  
  constexpr int constTest(void)
  {
      return sampleconstant;
  }
  int main()
  {
  
      std::cout &lt;&lt; constTest();
      getchar();
      return 0;
  }
  </code></pre>
  
  <p>This shows compile time error as follows:</p>
  
  <p>Error   1   error C2144: syntax error : 'int' should be preceded by ';'</p>
  
  <p>Error   2   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   </p>
  
  <p>I may be doing something silly here. But really can't figure out this error. Code looks ok to me. If any one can help me with error please help.</p>