2010-02-18から1日間の記事一覧

Boost.ParameterでArgumentPackの結合

C++

How to do a union of ArgumentPacks? #include <iostream> #include <boost/parameter/name.hpp> BOOST_PARAMETER_NAME(name1) BOOST_PARAMETER_NAME(name2) BOOST_PARAMETER_NAME(name3) template <class ArgPack> double f(const ArgPack& args) { return args[_name1] + args[_name2] + args[_name3]; } temp</class></boost/parameter/name.hpp></iostream>…