Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/xeus-cpp/xinterpreter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ namespace xcpp

std::string m_version;

std::string m_language;

xmagics_manager xmagics;
xpreamble_manager preamble_manager;

Expand Down
3 changes: 2 additions & 1 deletion src/xinterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ __get_cxx_version ()
//NOLINTNEXTLINE (cppcoreguidelines-pro-bounds-pointer-arithmetic)
createInterpreter(Args(argv ? argv + 1 : argv, argv + argc));
m_version = get_stdopt();
m_language = Cpp::GetLanguage(nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'm_language' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer]

src/xinterpreter.cpp:105:

-         xmagics()
+         m_language(GetLanguage(nullptr)), xmagics()
Suggested change
m_language = Cpp::GetLanguage(nullptr);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'GetLanguage' in namespace 'CppImpl' [clang-diagnostic-error]

	    m_language = Cpp::GetLanguage(nullptr);
                       ^

redirect_output();
init_preamble();
init_magic();
Expand Down Expand Up @@ -314,7 +315,7 @@ __get_cxx_version ()
return xeus::create_info_reply(
"xeus-cpp",
XEUS_CPP_VERSION,
"C++",
m_language,
m_version,
"text/x-c++src",
".cpp",
Expand Down
Loading