/in/foo.cc: In function 'void left_rotate(Node*)':
/in/foo.cc:44:62: error: expected primary-expression before ',' token
44 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^
/in/foo.cc:44:64: error: 'root' was not declared in this scope
44 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^~~~
/in/foo.cc:44:47: error: 'offsetof' was not declared in this scope
44 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^~~~~~~~
/in/foo.cc:4:1: note: 'offsetof' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
3 | #include <string.h>
+++ |+#include <cstddef>
4 |
/in/foo.cc: In function 'void right_rotate(Node*)':
/in/foo.cc:64:62: error: expected primary-expression before ',' token
64 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^
/in/foo.cc:64:64: error: 'root' was not declared in this scope
64 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^~~~
/in/foo.cc:64:47: error: 'offsetof' was not declared in this scope
64 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^~~~~~~~
/in/foo.cc:64:47: note: 'offsetof' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/in/foo.cc: In function 'void splay(Node*)':
/in/foo.cc:79:58: error: expected primary-expression before ',' token
79 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^
/in/foo.cc:79:60: error: 'root' was not declared in this scope
79 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^~~~
/in/foo.cc:79:43: error: 'offsetof' was not declared in this scope
79 | Editor* editor = (Editor*)((char*)x - offsetof(Editor, root));
| ^~~~~~~~
/in/foo.cc:79:43: note: 'offsetof' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?