Re: instantiation point discussion
- From: George <George@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 11 Mar 2008 17:40:03 -0700
Thanks Alf,
Good point. :-)
regards,
George
"Alf P. Steinbach" wrote:
g++ is free. Use the MingW version on Windows..
To test fine points of the language, use the free online demo of Comeau. Note
that it doesn't link. Or buy the full compiler.
Non-trivial template code should always be tested with at least two compilers.
Cheers, & hth.,
- Alf
* George:
Thanks Tim,
I will improve next time. Sometimes I want to get more knowledge, but I only
have MSVC at hand and I can not try two-phase name lookup compiler.
But there are cases which I should make tests before asking question, or
making enough tests. I will improve this points.
regards,
George
"Tim Roberts" wrote:
George <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
1. I think declaration of functions inside template function will neverI'm not enough of a C++ language lawyer to know whether you can actually
trigger instantiation of template., right?
say "never", but in this case it is certainly true.
3. If the sample looks like this, g(double) will be called when we call fGeorge, here is yet ANOTHER case where it would have been a hundred times
(2.0)?
faster for you to just TRY it. It took me 60 seconds to cut-and-paste your
code to a cpp file, compile it with /FAsc, and look at the resulting .cod
file to find the answer.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
- References:
- Re: instantiation point discussion
- From: Tim Roberts
- Re: instantiation point discussion
- From: George
- Re: instantiation point discussion
- From: Tim Roberts
- Re: instantiation point discussion
- From: George
- Re: instantiation point discussion
- From: Alf P. Steinbach
- Re: instantiation point discussion
- Prev by Date: Re: template function argument deduce
- Next by Date: functions
- Previous by thread: Re: instantiation point discussion
- Next by thread: Re: MSDN template sample
- Index(es):
Relevant Pages
|