Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8610101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:02:56+00:00 2026-06-12T04:02:56+00:00

Phase 7: White-space characters separating tokens are no longer significant. Each preprocessing token is

  • 0

Phase 7: White-space characters separating tokens are no longer significant.
Each preprocessing token is converted into a token. The resulting
tokens are syntactically and semantically analyzed and translated as a
translation unit.

Phase 8: Translated translation units and instantiation units are combined
as follows: Each translated translation unit is examined to produce a
list of required instantiations. The definitions of the required
templates are located. It is implementation-defined whether the source
of the translation units containing these definitions is required to
be available. All the required instantiations are performed to
produce instantiation units.[ Note: These are similar to translated
translation units, but contain no references to uninstantiated
templates and no template definitions. —end note ] The program is
ill-formed if any instantiation fails.

I have removed some of the notes to shorten the pasted text.

Why are templates locating and instantiating performed after the translation unit has already been translated in C++’s compilation phase 8? Shouldn’t these steps take place in phase 7 considering the two-phase name look-up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:02:57+00:00Added an answer on June 12, 2026 at 4:02 am

    This is a holdover from the now-deprecated export templates feature. Export templates allowed the definition of class and function templates to be located separately from their declaration (in an appropriate sense).

    As an implementation detail, separating translation unit translation from template instantiation can make sense, as it can reduce redundant work instantiating templates. However, most current compilers instantiate all templates at translation unit translation and eliminate duplicate instantiations at link time.

    It is hoped that concepts and modules will allow a similar feature to be reintroduced to the language in future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string of text chunked into phrases, with each phrase surrounded by
During production phase I would most probably look into migrate functionality (with versions and
We are planning to write an application that, in its start phase will be
Is there a Maven phase or goal to simply execute the main method of
I have recently finished phase 1 of my Facebook game: Rails Across Europe It
During the package phase of a VSeWSS deployment, an exception is thrown. From the
Inside of a phase listener class that runs during the RESTORE_VIEW phase, I have
The apply phase of save may fail and/or is still being done asynchronously before
I am implementing 2-phase commit for a distributed transaction(using 2 Databases). I simulate a
Currently in development and testing phase, in order to distribute my app amoung test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.