This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64647] [5 Regression] [C++14] std::__max_element contains code not allowed in constexpr function
- From: "ville.voutilainen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 17 Jan 2015 20:28:33 +0000
- Subject: [Bug c++/64647] [5 Regression] [C++14] std::__max_element contains code not allowed in constexpr function
- Auto-submitted: auto-generated
- References: <bug-64647-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64647
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
Component|libstdc++ |c++
--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
This code
template<typename T>
constexpr T foo(T t)
{
T tt = t;
++tt;
return tt;
}
struct X
{
X() { }
X& operator++() { return *this; }
};
int main()
{
X x;
foo(x);
}
is accepted by clang but rejected by gcc. Moving to front-end.