• 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: John Mikros <email@hidden>
  • Date: Fri, 23 Feb 2007 22:12:24 -0800


On Feb 23, 2007, at 9:43 PM, John Daniel wrote:

On Feb 23, 2007, at 6:37 PM, John Mikros wrote:

Visual C++ doesn't seem to do two-phase lookup at all.  In fact your template can be complete garbage and the code will compile as long as that template is never instantiated.  I'm not defending VC++; I've just had to deal with its differences from GCC, and this one's been a big headache.

That one isn't really VC's problem. GCC is just as happy with uninstantiated garbage.

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 }
};



 _______________________________________________
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: Ladd Van Tol <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>)

  • Prev by Date: Re: Templates question
  • Next by Date: Re: Templates question
  • Previous by thread: Re: Templates question
  • Next by thread: Re: Templates question
  • Index(es):
    • Date
    • Thread