Skip to content

Commit f486377

Browse files
#include <optional> if C++ version >= 17 (#122)
1 parent 5c6e236 commit f486377

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clingwrapper/src/clingwrapper.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ class ApplicationStarter {
250250
"#include <set>\n" // FIXME: Replace with modules
251251
"#include <chrono>\n" // FIXME: Replace with modules
252252
"#include <cmath>\n" // FIXME: Replace with modules
253+
"#if __has_include(<optional>)\n"
254+
"#include <optional>\n"
255+
"#endif\n"
253256
"#include \"clang/Interpreter/CppInterOp.h\"";
254257
Cpp::Process(code);
255258

0 commit comments

Comments
 (0)