• 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
Re: Templates question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Templates question


  • Subject: Re: Templates question
  • From: Ladd Van Tol <email@hidden>
  • Date: Fri, 23 Feb 2007 22:47:51 -0800

On Feb 23, 2007, at 10:12 PM, John Mikros wrote:

That is not true.

As long as the following is not instantiated, it compiles in Visual C++, but not in GCC.

template <typename T> class foo {
foo(T t) { this is garbage }
};

Visual C++ also permits some crazy things like pointer-to-member-function as a template argument. I've actually seen this used in someone else's code too.

template <typename T, typename C, T (C::*getter)() const> class CrazyTemplate
{

};

- Ladd
 _______________________________________________
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

  • Follow-Ups:
    • Re: Templates question
      • From: David Fang <email@hidden>
References: 
 >Re: Templates question (From: David Fang <email@hidden>)
 >Re: Templates question (From: John Mikros <email@hidden>)
 >Re: Templates question (From: John Daniel <email@hidden>)
 >Re: Templates question (From: John Mikros <email@hidden>)

  • Prev by Date: Re: Templates question
  • Next by Date: Re: How do I access DiskArbitration from Panther AND Tiger?
  • Previous by thread: Re: Templates question
  • Next by thread: Re: Templates question
  • Index(es):
    • Date
    • Thread