123456
template <typename Target, typename ...RefBy> struct TableDef { static Target target; static std::tuple<RefBy...> reference_list; };
12345678910
#include <tuple> template < typename... TYPES > std::tuple<TYPES...> tup( TYPES&&... refs ) { return std::tuple<TYPES...>{ std::forward<TYPES>(refs)... } ; } // construct tuple using pack expansion int main() { const auto tuple = tup( 1, 2.3, "hello", nullptr ) ; static_assert( std::tuple_size< decltype(tuple) >::value == 4 ) ; }