typedef declaration syntax

Posted by mt_serg on Stack Overflow See other posts from Stack Overflow or by mt_serg
Published on 2010-04-19T12:35:45Z Indexed on 2010/04/19 12:43 UTC
Read the original article Hit count: 237

Filed under:
|
|
|

Some days ago I looked at boost sources and found interesting typedef.

There is a code from "boost\detail\none_t.hpp":

namespace boost {

namespace detail {

struct none_helper{};

typedef int none_helper::*none_t ;

} // namespace detail

} // namespace boost

I didn't see syntax like that earlier and can't explain the sense of that.

This typedef introduces name "none_t" as pointer to int in boost::detail namespace.

What the syntax is?

And what difference between "typedef int none_helper::*none_t" and for example "typedef int *none_t" ?

© Stack Overflow or respective owner

Related posts about c++

Related posts about typedef