请考虑以下事项:
// what is N?
typedef boost::variant<T1, ..., TN> variant_t;
这里可以接受多少个模板参数?
答案 0 :(得分:3)
答案隐藏在文档中:
http://www.boost.org/doc/libs/1_53_0/doc/html/BOOST_VARIANT_LIMIT_TYPES.html
// In header: <boost/variant/variant_fwd.hpp>
BOOST_VARIANT_LIMIT_TYPES