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. Advertising

  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. Advertising

  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. 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. Rakesh Sinha
    Replies:
    4
    Views:
    1,840
    Rakesh Sinha
    Jan 13, 2005
  2. Dave
    Replies:
    10
    Views:
    35,237
    Ron Natalie
    May 22, 2005
  3. Replies:
    11
    Views:
    1,086
  4. Javier
    Replies:
    2
    Views:
    543
    James Kanze
    Sep 4, 2007
  5. 0m
    Replies:
    26
    Views:
    1,090
    Tim Rentsch
    Nov 10, 2008
Loading...

Share This Page