Skip to content
  1. Nov 19, 2008
    • Douglas Gregor's avatar
      Partial expansion of C++ operator overloading (for binary operators) · 436424cf
      Douglas Gregor authored
      to support operators defined as member functions, e.g.,
      
        struct X { 
          bool operator==(X&);
        };
      
      Overloading with non-member operators is supported, and the special
      rules for the implicit object parameter (e.g., the ability for a
      non-const *this to bind to an rvalue) are implemented.
      
      This change also refactors and generalizes the code for adding
      overload candidates for overloaded operator calls (C++ [over.match.expr]),
      both to match the rules more exactly (name lookup of non-member
      operators actually ignores member operators) and to make this routine
      more reusable for the other overloaded operators.
      
      Testing for the initialization of the implicit object parameter is
      very light. More tests will come when we get support for calling
      member functions directly (e.g., o.m(a1, a2)).
      
      llvm-svn: 59564
      436424cf
  2. Nov 18, 2008
  3. Nov 17, 2008
Loading