gpt4 book ai didi

c++ - recursive_wrapper 和模棱两可的 convert_construct()

转载 作者:行者123 更新时间:2023-11-30 02:48:57 24 4
gpt4 key购买 nike

<分区>

你知道如何解决或绕过这个问题吗?

http://boost.2283326.n4.nabble.com/Variant-recursive-wrapper-and-ambiguous-convert-construct-td4543139.html

#include <boost/variant.hpp>
class b_fwd;
typedef boost::variant<boost::recursive_wrapper<b_fwd> > a;
class c_fwd;
typedef boost::variant<boost::recursive_wrapper<c_fwd> > b;

struct b_fwd : b {
// inherit constructors
template <typename... Ts> b_fwd(Ts... o) : b(o...) {}
};

typedef boost::variant<double, char *> c;

struct c_fwd : c {
// inherit constructors
template <typename... Ts> c_fwd(Ts... o) : c(o...) {}
};

void f(const b &b_node)
{
a a_node(b_node);
}

int main()
{
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com