7 #include <hilti/ast/node.h> 8 #include <hilti/ast/type.h> 9 #include <hilti/base/type_erase.h> 20 #include <hilti/autogen/__ctor.h> 23 inline Node to_node(Ctor t) {
return Node(std::move(t)); }
26 inline std::ostream& operator<<(std::ostream& out, Ctor c) {
return out << to_node(std::move(c)); }
28 inline bool operator==(
const Ctor& x,
const Ctor& y) {
32 assert(x.isEqual(y) == y.isEqual(x));
36 inline bool operator!=(
const Ctor& c1,
const Ctor& c2) {
return ! (c1 == c2); }
41 using Ctor = ctor::detail::Ctor;
42 using ctor::detail::to_node;
45 template<typename T, typename std::enable_if_t<std::is_base_of<trait::isCtor, T>::value>* =
nullptr>
46 inline Node to_node(T t) {
47 return Node(Ctor(std::move(t)));