public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12536] New: Regression regarding partial ordering
@ 2003-10-08  6:55 jhr dot walter at t-online dot de
  2003-10-09  3:58 ` [Bug c++/12536] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: jhr dot walter at t-online dot de @ 2003-10-08  6:55 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12536

           Summary: Regression regarding partial ordering
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jhr dot walter at t-online dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

Hello,

the following program

----------
#include <iostream>

template<class T>
struct some_type {};

template<typename A>
some_type<A> foo(A const& a) {
    std::cout << "foo<A>" << std::endl;
    return some_type<A>();
}

template<typename R, typename A>
some_type<R> foo(A const& a)  {
    std::cout << "foo<R,A>" << std::endl;
    return some_type<R>();
}

template<typename A>
some_type<A> bar(A const& a, A const& = A()) {
    std::cout << "bar<A>" << std::endl;
    return some_type<A>();
}

template<typename R, typename A>
some_type<R> bar(A const& a, R const& = R())  {
    std::cout << "bar<R,A>" << std::endl;
    return some_type<R>();
}

int main() {
    foo<int>(0);
    bar<int>(0);
}

----------

outputs

----------
foo<R,A>
bar<A>
----------

when compiled with GCC 2.95.3 and

----------
foo<R,A>
bar<R,A>
----------

when compiled with GCC 3.3.1.

I believe GCC 2.95.3 is correct.

Best,
Joerg Walter

P.S.: thanks to Patrick Kowalzick, Chris Theis and Graeme Prentice.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-06-02 18:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08  6:55 [Bug c++/12536] New: Regression regarding partial ordering jhr dot walter at t-online dot de
2003-10-09  3:58 ` [Bug c++/12536] " pinskia at gcc dot gnu dot org
2003-10-13  7:01 ` jhr dot walter at t-online dot de
2003-10-13  8:05 ` nathan at gcc dot gnu dot org
2003-10-13  8:15 ` jhr dot walter at t-online dot de
2003-10-13 16:52 ` nathan at gcc dot gnu dot org
2003-10-15  8:26 ` jhr dot walter at t-online dot de
2003-10-30 23:40 ` bangerth at dealii dot org
2003-10-31  8:45 ` nathan at gcc dot gnu dot org
2003-10-31 17:30 ` nathan at gcc dot gnu dot org
2003-11-01  9:15 ` jhr dot walter at t-online dot de
2005-04-07  7:07 ` [Bug c++/12536] [DR 214/200] partial ordering bug pinskia at gcc dot gnu dot org
2005-05-10 13:30 ` nathan at gcc dot gnu dot org
2005-06-02 18:10 ` nathan at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).