fork download
  1. struct Node;
  2. using ValueType = int;
  3.  
  4. union d_type
  5. {
  6. struct
  7. {
  8. Node *_lhs, *_rhs;
  9. } _ptrpair;
  10. ValueType _val;
  11.  
  12. d_type() noexcept = default;
  13. d_type(const d_type&) noexcept = default;
  14. d_type(d_type&&) noexcept = default;
  15. d_type& operator=(const d_type&) noexcept = default;
  16. d_type& operator=(d_type&&) noexcept = default;
  17. ~d_type() noexcept = default;
  18.  
  19. d_type(const ValueType& v) noexcept
  20. {
  21. _val = v;
  22. }
  23. d_type(Node* lhs, Node* rhs) noexcept
  24. {
  25. _ptrpair = { lhs, rhs };
  26. }
  27. };
  28.  
  29. d_type a{ nullptr, nullptr };
  30. d_type b{ 0 };
  31. int main(){}
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty