• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
XCode 2.2, templates, overloads, Obj-C types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCode 2.2, templates, overloads, Obj-C types


  • Subject: XCode 2.2, templates, overloads, Obj-C types
  • From: Scott Ribe <email@hidden>
  • Date: Tue, 15 Nov 2005 17:32:41 -0700
  • Thread-topic: XCode 2.2, templates, overloads, Obj-C types

In 2.1 I got away with the following overloaded constructors:

        template <typename Fun>
        Functor(Fun fun)
        : spImpl_(new FunctorHandler<Functor, Fun>(fun))
        {}

        template <class PtrObj, typename MemFn>
        Functor(const PtrObj& p, MemFn memFn)
        : spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
        {}

         Functor( id target, SEL selector)
        : spImpl_( new ObjCFunHandler<Functor, ResultType>(target,
selector))
        {}

But in 2.2, constructing a functor with a pointer to an NSObject-derived
class and a selector instantiates the 2nd form, instead of calling the
third, which doesn't work, since selectors and member function pointers are
not actually interchangeable.

Bug? Feature that I don't understand? What to do here?

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 665-7007 voice


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: How are __LITTLE_ENDIAN__ and __BIG_ENDIAN__ defined?
  • Next by Date: Re: Does Xcode 2.2 change a 2.1 project file?
  • Previous by thread: Re: Can't get Xcode & Perforce to work (Xcode bug!)
  • Next by thread: Xcode jam error
  • Index(es):
    • Date
    • Thread