[Bug c++/23698] New: [4.1 Regression] accepts invalid

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Sep 2 15:41:00 GMT 2005


The following code is accepted in 4.1 but should not be:
struct g   {
  bool operator==(const g& __arg) const;
};
template< typename T > struct is_integral {
  static const T value = false;
};
template <bool>   struct enable_if_c;
template<typename Functor> typename enable_if_c<(is_integral<Functor>::value)>::type 
operator==(const int& f, Functor g)   {
}
template<class D>     int get_deleter( g const & ti, g const & ti1 )     {
  return ti == ti1;
}

-- 
           Summary: [4.1 Regression] accepts invalid
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list