Cannot include/using from within a namespace or class #2381
-
When using json.hpp (single include) if I include it from inside a namespace or a class like the following example. I'm unsure if this is intended behavior or a bug.
My Makefile is... using the C++17 standard.
I've included the error log for further analysis. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You definitely shouldn't do that. You've just introduced all of these types inside the |
Beta Was this translation helpful? Give feedback.
You definitely shouldn't do that. You've just introduced all of these types inside the
Modals
namespace when they expect to be in the global namespace. This extends not just to the types fromjson.hpp
but also to all the types in all the standard headers included by thejson.hpp
header.