Re: instantiation point discussion

Tech-Archive recommends: Speed Up your PC by fixing your registry



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
    ... Or buy the full 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: _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)
  • Re: Internal Complier Error in Visual C++ 1.52
    ... You're using a very old version of both the IDE and the compiler. ... > function declaration for an existing class in a header file and function ... > implementation in the .cpp file i am getting an error as given below ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Preprocessor, nested files etc.
    ... > we have to do this, it takes around 2 hours for a complete recompile). ... > When the compiler compiles a *.cpp file, it starts in a fresh state. ... > it has learned by compiling a previous source code file remains. ...
    (comp.lang.cpp)
  • Re: including a large constants file
    ... "john smith" wrote in message ... > If I have a large constants file and include that in a .cpp file will the ... That depends entirely upon your compiler and platform. ... None of what you ask is addressed by the language, ...
    (comp.lang.cpp)