$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-01-15 14:29:56
Nat Goodspeed wrote:
> My one additional comment on design: people are very used to writing
> my_singleton::instance()->member. I like the coolness of writing
> my_singleton::instance->member instead, but I suspect I'll hear some
> grumbling from colleagues who keep getting reminded by compile errors. I
> wish it were possible to provide 'instance' as both a static data member
> and a static member function...
> But I'd be good with having this become the new convention.
>
It's actually easy, although I don't think it's a good idea:
class instance_t {
T* operator->() const;
T* operator()() const;
};
In Christ,
Steven Watanabe