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 844709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:19:47+00:00 2026-05-15T06:19:47+00:00

Is there a difference between a class template and template class. If so what

  • 0

Is there a difference between a class template and template class. If so what is it?

  • 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-05-15T06:19:47+00:00Added an answer on May 15, 2026 at 6:19 am

    When both terms are used there is a very subtle difference. It is more linguistic than semantic, it depends on which word you are modifying.

    In short, a class template is a particular kind of template. Templates can define either classes or functions. A class template is a template that defines a class. See the difference:

    template <typename T> class SomeClass {...};      // this is a class template
    template <typename T> int some_function(T&) {...} // this is a function template
    

    A template class is a particular kind of class. There are many kinds of classes, and in particular, template classes are those defined using a class template. Contrast:

    SomeClass sc;         // SomeClass is an ordinary (non-template) class
    SomeClass<int> sc;    // SomeClass<int> is a template class
    

    From Stroustrup’s C++ Glossary:

    template class – class parameterized by types, values, or templates. The
    template arguments necessary to identify the class to be generated for
    the class template must be provided where a template class is used. For
    example “vector<int> v;” generates a vector of ints from the vector
    template. See also template. TC++PL 13.2, D&E 15.3.

    Both expressions are used in Stroustrup’s book The C++ Programming Language, and the ISO/IEC C++ standard until 1998.

    Note: As discussed in the comments below, it seems that C++03 doesn’t use the term “template class” anymore (although I don’t have a copy of it), presumably to reduce confusion. As I said before, they are fundamentally the same thing, it is just a linguistic difference: in the templates context you refer to a particular kind of template or in the classes context you refer to a particular kind of class. If you just stick to “class template”, you won’t lose anything.

    More food for thought:

    • What is the difference between a template class and a class template?
    • Is there a difference between a function template and a template function, or between a class template and a template class? — link suggested by Josh Haberman
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a difference in usage between class Helper class << self # ...
Is there a difference between foo and bar: class A { Object __o; void
Is there a functional difference between the following syntax... [Foo, Bar] public class Baz
Is there a difference between class Foo(object): bar = 1 def __init__(self): ... etc.
Possible Duplicate: What is the difference between a template class and a class template?
Possible Duplicate: What is the difference between a template class and a class template?
Is there any difference between a Singleton class and a class with all static
Is there a difference between .class element and element.class in a CSS selector? I
In Ruby, is there a difference between writing class Foo::Bar and module Foo; class
Is there any difference between these: struct Class* CreateClass(); and: Class* CreateClass(); It's just

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.