[Bug c++/59135] Incorrect ambiguity in constexpr function overloads
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 20 09:11:00 GMT 2013
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);
}
//----------------------------------
More information about the Gcc-bugs
mailing list