static const T vs static T const

Discussion in 'C++' started by er, Apr 22, 2008.

  1. er

    er Guest

    hi all,

    probably a simple question: i'm used to static const T, i can also
    understand static const T* const, but i'm not sure what this, for
    example, means:

    template <class T>
    struct my_struct
    {
    static bool const value = false;

    };

    thanks!
     
    er, Apr 22, 2008
    #1
    1. Advertisements

  2. er

    Guest

    On Apr 22, 3:10 pm, er <> wrote:

    > probably a simple question: i'm used to static const T, i can also
    > understand static const T* const, but i'm not sure what this, for
    > example, means:
    >


    > static bool const value = false;


    'static' doesn't add anything to the question. It is not different
    than the fact that there is no difference between these two:

    Type const o;
    const Type o;

    So it's the same thing.

    Ali
     
    , Apr 22, 2008
    #2
    1. Advertisements

  3. er

    sk_usenet Guest

    "er" <> wrote in message
    > hi all,
    >
    > probably a simple question: i'm used to static const T, i can also
    > understand static const T* const, but i'm not sure what this, for
    > example, means:
    >
    > template <class T>
    > struct my_struct
    > {
    > static bool const value = false;


    Same as static const bool val = ..

    --
    http://techytalk.googlepages.com
     
    sk_usenet, Apr 22, 2008
    #3
  4. er

    er Guest

    On Apr 22, 6:20 pm, "sk_usenet" <sometechyguy at gmail dot com> wrote:
    > "er" <> wrote in message
    > > hi all,

    >
    > > probably a simple question: i'm used to static const T, i can also
    > > understand static const T* const, but i'm not sure what this, for
    > > example, means:

    >
    > > template <class T>
    > > struct my_struct
    > > {
    > > static bool const value = false;

    >
    > Same as static const bool val = ..
    >
    > --http://techytalk.googlepages.com


    thank you both.
     
    er, Apr 22, 2008
    #4
    1. Advertisements

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. Dario de Judicibus

    static const array of const structure

    Dario de Judicibus, Nov 10, 2003, in forum: C++
    Replies:
    1
    Views:
    9,217
    Rolf Magnus
    Nov 10, 2003
  2. Rakesh Sinha
    Replies:
    4
    Views:
    2,147
    Rakesh Sinha
    Jan 13, 2005
  3. Dave
    Replies:
    10
    Views:
    35,835
    Ron Natalie
    May 22, 2005
  4. Replies:
    11
    Views:
    1,413
  5. Javier
    Replies:
    2
    Views:
    905
    James Kanze
    Sep 4, 2007
  6. 0m
    Replies:
    26
    Views:
    1,490
    Tim Rentsch
    Nov 10, 2008
  7. fungus
    Replies:
    13
    Views:
    1,234
    fungus
    Oct 31, 2008
  8. Replies:
    2
    Views:
    696
    Andrew Koenig
    Feb 9, 2009
Loading...