From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabriel Dos Reis To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector Date: Tue, 10 Jul 2001 04:26:00 -0000 Message-id: <20010710112602.9346.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00267.html List-Id: The following reply was made to PR c++/3628; it has been noted by GNATS. From: Gabriel Dos Reis To: Richard.Kreckel@ginac.de Cc: Gabriel Dos Reis , gcc-gnats@gcc.gnu.org, Joe Buck Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector Date: 10 Jul 2001 13:16:47 +0200 "Richard B. Kreckel" writes: | On 9 Jul 2001, Gabriel Dos Reis wrote: | [...] | > The fix is to leave std::rel_ops where it is and not to touch it. | > We need to tell users to forget about std::rel_ops. | | What's the reason? The reason is that operators defined in std::rel_ops are toooo greedy and do not interact well with the rest of the language. The mere fact that they were sequestred in a separate namespace should be an indication that they were a mistake. | Is it impossible to fix this? Fix what exactly? | If so, is there a workaround? Don't use std::rel_ops. | After all, a compiler conforming to section 20.2 | [lib.utility] should provide std::rel_ops. Certainly, certainly. But not just because it is there means you're obliged to use it -- and in this particular case, it is well known that they were a mistake. -- Gaby