tuple のインスタンスを作る

boost::python::make_tuple 関数を使う。

構文

namespace boost::python
{
    // この表記はオリジナルの実装と一部ことなる。
    // 詳細は <boost/python/detail/make_tuple.hpp> を参照のこと。
    template<class... Ts>
    tuple make_tuple(const Ts&...);
}

具体例

#include <boost/python.hpp>
namespace python = boost::python;

python::object make_tuple()
{
    return python::make_tuple(1, 2.3, "test");
}

ソースコード

参考

results matching ""

    No results matching ""