re PR c++/59329 (Using `assert(...)` is not allowed in constexpr functions)

2015-03-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59329
	* g++.dg/cpp1y/constexpr-assert1.C: New.

From-SVN: r221740
This commit is contained in:
Paolo Carlini 2015-03-27 17:21:32 +00:00 committed by Paolo Carlini
parent 13be44ed9d
commit 4e55d61a1b
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2015-03-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59329
* g++.dg/cpp1y/constexpr-assert1.C: New.
2015-03-27 Marek Polacek <polacek@redhat.com>
PR c++/65556

View File

@ -0,0 +1,10 @@
// PR c++/59329
// { dg-do compile { target c++14 } }
#include <cassert>
inline constexpr int exampleFunction(int min, int max)
{
assert(min <= max);
return min + max;
}