This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59135] Incorrect ambiguity in constexpr function overloads
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Nov 2013 09:11:30 +0000
- Subject: [Bug c++/59135] Incorrect ambiguity in constexpr function overloads
- Auto-submitted: auto-generated
- References: <bug-59135-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59135
--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
The problem seems to exist in gcc 4.7.3 and within the recent 4.9.0 trunk. The
following variant of the code removes unnecessary library dependencies and
constexpr (which is not needed to reproduce the problem):
//----------------------------------
template <typename T>
struct foo
{
};
template <int N, typename T, typename ...Us>
bool bar(T &&, Us &&...)
{
return false;
}
template <int N, typename T, typename ...Us>
bool bar(foo<T> &&, Us &&...)
{
return true;
}
int main()
{
bar<0>(foo<int>(), 1, 2);
}
//----------------------------------