Thread: template argument

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    template argument

    Hello everyone,


    I can not find precise definition for typed argument for template and non-typed argument for template.

    My understanding is,

    code like

    Code:
    template <class T, int size> class Foo {
    // ...
    }
    T is typed template argument, and size is non-typed template argument. My understanding correct?


    thanks in advance,
    George

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    "type" and "non-type", but otherwise correct.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Sorry CornedBee,


    What do you mean "type" and "non-type", but otherwise correct? You mean change typed to type and change non-typed to non-type?

    Quote Originally Posted by CornedBee View Post
    "type" and "non-type", but otherwise correct.

    regards,
    George

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Yes.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks CornedBee,


    Question answered.

    Quote Originally Posted by CornedBee View Post
    Yes.

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. template function argument deduce
    By George2 in forum C++ Programming
    Replies: 2
    Last Post: 03-11-2008, 08:56 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  4. Nested loop frustration
    By caroundw5h in forum C Programming
    Replies: 14
    Last Post: 03-15-2004, 09:45 PM
  5. oh me oh my hash maps up the wazoo
    By DarkDays in forum C++ Programming
    Replies: 5
    Last Post: 11-30-2001, 12:54 PM