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:
parent
13be44ed9d
commit
4e55d61a1b
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue