imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

struct EditorContext has inconsistent namespace

Open vlmillet opened this issue 2 years ago • 1 comments

in imgui_node_editor.h, struct EditorContext is forward declared in ax::NodeEditor namespace, while it is defined in ax::NodeEditor::Detail. It seems to be wanted as the reinterpret_cast tells in CreateEditor, but it provokes unknown symbol dependency reflection while using your library with my reflection meta compiler. Is there a strong reason why it is like this ? I suggest in imgui_node_editor.h something like this to avoid compiler misleading :

namespace Detail
{
    struct EditorContext;
}
using EditorContext = Detail::EditorContext;

instead of struct EditorContext;

vlmillet avatar Dec 10 '22 18:12 vlmillet

struct EditorContext; was ment to be opaque handle to editor. Like FILE in stdio.

It is possible to pull EditorContext out of Details namespace internally. What I do not wish to do is to put implementation details in public header.

Do you need access to implementation details?

Maybe there is a way to better articulate for your compiler that it treat this declaration as opaque handle?

thedmd avatar May 02 '23 15:05 thedmd