Definitions of member functions of `YAML::Node` is non-conforming, leads to confusing errors
Currently, member functions of Node are declared, but not defined, in node.h, e.g. like:
class Node {
public:
~Node();
// ...
};
They are then defined in a header (!) impl.h as inline, e.g. like:
#include "node.h"
inline Node::~Node() = default;
This is problematic: it violates https://eel.is/c++draft/dcl.spec#dcl.inline-5 and http://eel.is/c++draft/basic.def.odr#11 (never mind the new module wording; similar wording existed previously).
The basic problem is that if a user only includes node.h, they may or may not end up with undefined symbols at link time, depending on whether any part of the library happens to include definitions of those inline functions. Maybe you get lucky, but with the destructor in particular we have seen real failures (since a destructor can result in multiple function definitions being emitted, depending on the ABI, and not all of them may be included by the precompiled parts of the yaml library).
Users can work around this by always including both node.h and impl.h.
I propose to make the code standard conforming. Perhaps the easiest way to do so would be to get rid of the impl.h header and just define all the member functions inline in the class definition. Since users already need to include all that code anyway for portability, this should not add a significant burden.