Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   static const T vs static T const (http://www.velocityreviews.com/forums/t610563-static-const-t-vs-static-t-const.html)

er 04-22-2008 10:10 PM

static const T vs static T const
 
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!

acehreli@gmail.com 04-22-2008 10:15 PM

Re: static const T vs static T const
 
On Apr 22, 3:10 pm, er <erwann.rog...@gmail.com> 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

sk_usenet 04-22-2008 10:20 PM

Re: static const T vs static T const
 
"er" <erwann.rogard@gmail.com> 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



er 04-22-2008 10:22 PM

Re: static const T vs static T const
 
On Apr 22, 6:20 pm, "sk_usenet" <sometechyguy at gmail dot com> wrote:
> "er" <erwann.rog...@gmail.com> 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.


All times are GMT. The time now is 06:23 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.