7 #include <hilti/ast/node.h> 8 #include <hilti/ast/type.h> 9 #include <hilti/base/type_erase.h> 18 namespace ctor::detail {
19 #include <hilti/autogen/__ctor.h> 22 inline Node to_node(Ctor t) {
return Node(std::move(t)); }
25 inline std::ostream& operator<<(std::ostream& out, Ctor c) {
return out << to_node(std::move(c)); }
27 inline bool operator==(
const Ctor& x,
const Ctor& y) {
31 assert(x.isEqual(y) == y.isEqual(x));
35 inline bool operator!=(
const Ctor& c1,
const Ctor& c2) {
return ! (c1 == c2); }
39 using Ctor = ctor::detail::Ctor;
40 using ctor::detail::to_node;
43 template<typename T, typename std::enable_if_t<std::is_base_of<trait::isCtor, T>::value>* =
nullptr>
44 inline Node to_node(T t) {
45 return Node(Ctor(std::move(t)));