#include "boost/config.hpp"
#include "boost/core/lightweight_test.hpp"
#ifdef __cpp_inheriting_constructors
#include <string>
#include <boost/variant.hpp>
#include <boost/array.hpp>
struct Leaf { };
struct Node;
typedef boost::variant<Leaf, boost::recursive_wrapper<Node>> TreeBase;
struct Tree : TreeBase {
using TreeBase::TreeBase;
template <typename Iter>
static Tree Create(Iter , Iter ) { return Leaf{}; }
};
struct Node {
Tree left, right;
};
template<class Node>
struct node1_type;
struct var_type;
using var_base = boost::variant<int,
boost::recursive_wrapper<node1_type<var_type>>
>;
template<class Node>
struct node1_type {
boost::array<Node, 1> children;
};
struct var_type : var_base {
using var_base::var_base;
};
void run() {
std::string input{"abracadabra"};
const Tree root = Tree::Create(input.begin(), input.end());
(void)root;
var_type v1 = 1;
(void)v1;
}
#else
void run() {}
#endif
int main()
{
run();
return boost::report_errors();
}