|
Boost Users : |
Subject: Re: [Boost-users] Change return type automatically
From: Surya Kiran Gullapalli (suryakiran.gullapalli_at_[hidden])
Date: 2009-10-30 15:47:02
> #include <boost/fusion/include/vector.hpp>
> #include <boost/fusion/include/at.hpp>
>
> class A {
> private:
> typedef boost::fusion::vector<
> boost::signal<void()>,
>
> boost::signal<void (const string&)>
> > signals_type;
> signals_type m_signals;
> public:
> static const int VoidSignal = 0;
> static const int StringSignal = 1;
> template<int ID>
> typename boost::fusion::result_of::at_c<signals_type, ID>::type
> getSignal() { return boost::fusion::at_c<ID>(m_signals); }
> };
>
> void f() {
> A a;
> a.getSignal<A::VoidSignal>()
>
> }
>
>
It worked,
Thanks,
Surya
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net