explaination need for if such a qualifier appears at the outermost level of the parameter type, it i

Discussion in 'C++' started by baumann@pan, May 19, 2005.

  1. baumann@pan

    baumann@pan Guest

    hi all,


    Nontype template parameters are declared much like variables, but they
    cannot have nontype specifiers like static, mutable, and so forth. They
    can have const and volatile qualifiers, but if such a qualifier appears
    at the outermost level of the parameter type, it is simply ignored:

    template<int const length> class Buffer; // const is useless here
    template<int length> class Buffer; // same as previous
    declaration



    can anyone give an exmaple of how to write a const/volatile useful
    templates to illustrate the case contrasted to the "
    but if such a qualifier appears at the outermost level of the
    parameter type, it is simply ignored:"



    baumann@pan
    baumann@pan, May 19, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pabbu
    Replies:
    8
    Views:
    719
    Marc Boyer
    Nov 7, 2005
  2. Road Tang
    Replies:
    13
    Views:
    1,183
    Road.Tang
    Mar 26, 2008
  3. paulo
    Replies:
    9
    Views:
    703
    James Kanze
    Mar 6, 2009
  4. Chris Morris

    RegExp outermost ()

    Chris Morris, Jul 22, 2003, in forum: Ruby
    Replies:
    1
    Views:
    101
    Ben Giddings
    Jul 22, 2003
  5. Graham Wood
    Replies:
    3
    Views:
    531
    A. Sinan Unur
    Jan 11, 2004
Loading...

Share This Page