This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59135] Incorrect ambiguity in constexpr function overloads


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);
}
//----------------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]