Re: Re: [cpp] 请教, boost::none_t 中一个语法问题
Azrael
king.terrors at gmail.com
Wed Apr 19 11:25:13 CST 2006
是不是说 ptr 是指向结构B的成员变量的指针,
然后他实际指向的那个成员变量类型是结构A。
On 4/18/06, jiyong wu <jiyong.wu at gmail.com> wrote:
>
> 谢谢各位的回答。
>
> to Fei XU:
> 看看下面这个形式的代码:
>
> struct A;
>
> struct B
> {
> };
>
> typedef A B::*ptr;
>
> 我是这么理解了:
> 定义一个指针类型和使其指向某个实例是不相关的。int是内建类型,所以不必像上面那样声明A这个类型。
>
>
> On 4/18/06, Fei Xu <flyingxu at gmail.com> wrote:
> >
> > 但是在楼主的帖子中,结构体是空的啊,这个时候类的成员的地址,是什么?
> >
> > ======== 10:33:37 您在来信中写道: ========
> >
> >
> >
> >
> > namespace detail { struct none_helper{}; }
> > typedef int detail::none_helper::*none_t ;
> >
> > 去掉 namespace detail就是如下:
> >
> > struct none_helper{};
> >
> > typedef int none_helper::*none_t;
> >
> > 这个typedef 语句是什么意思?
> >
> >
> >
> >
> >
> >
> > --
> > Fei Xu
> > Shanghai, China
> >
> > _______________________________________________
> > Cpp mailing list
> > Cpp at codingnow.com
> > http://codingnow.com/mailman/listinfo/cpp
> >
>
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20060419/e1c34186/attachment.html
More information about the Cpp
mailing list