#ifndef VARIABLE_LIST_HPP_INCLUDED #define VARIABLE_LIST_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include template class variable_list_member { public: typedef typename boost::mpl::apply1::type member_type; member_type& get() { return member_; } const member_type& get() const { return member_; } private: member_type member_; }; template > class variable_list: private boost::mpl::fold< Sequence, boost::mpl::empty_base, boost::mpl::inherit< boost::mpl::_1, variable_list_member< boost::mpl::_2, typename boost::mpl::lambda::type > > >::type { typedef typename boost::mpl::lambda::type op_type; public: template typename variable_list_member::member_type & get() { return static_cast&>(*this).get(); } template const typename variable_list_member::member_type & get()const { return static_cast&>(*this).get(); } }; #endif // VARIABLE_LIST_HPP_INCLUDED