Re: instantiation point discussion



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 never
trigger instantiation of template., right?
I'm not enough of a C++ language lawyer to know whether you can actually
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 f
(2.0)?
George, here is yet ANOTHER case where it would have been a hundred times
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?

.



Relevant Pages

  • Re: instantiation point discussion
    ... To test fine points of the language, use the free online demo of Comeau. ... Sometimes I want to get more knowledge, but I only have MSVC at hand and I can not try two-phase name lookup compiler. ... code to a cpp file, compile it with /FAsc, and look at the resulting .cod ... Tim Roberts, timr@xxxxxxxxx ...
    (microsoft.public.vc.language)
  • Re: Very basic question
    ... > Yes, of course, it would be very hard to write programs in seperate files ... one cpp file within the other I got lots of errors because I used the same ... the compiler *guess* that there must be a b.cpp if there is a b.h? ... Regards, ...
    (comp.lang.cpp)
  • Re: Full path to src in a static library
    ... Oleg Starodumov wrote: ... to the .cpp file that was passed to the compiler. ... Best Regards ...
    (microsoft.public.vc.debugger)
  • Re: GDI+ newbye
    ... I did met the same problem, after comment below lines in the cpp file is ok. ... Regards ... > I'm trying to use GDI+ in a MFC applcation, ... > The compiler tells me: ...
    (microsoft.public.vc.mfc)
  • Re: _beginthread help - undeclared identifier error
    ... reference to executeScript. ... executeScript, your definition didn't match the one the compiler invented, ... >This would be much more helpful than attacking a ... - Tim Roberts, timr@xxxxxxxxx ...
    (microsoft.public.vc.language)