Debian Codegraph @

corpus/ffi_build/project-cxx/foo2.cpp

raw
1 // This requires C++11 (I believe)
2 // TODO: support older c++ compilers.
3 #include <iostream>
4
5 class Foo2 {
6 public:
7 const char *answer() { return "42"; };
8 };
9
10 extern "C" const char *
11 foo2()
12 {
13 Foo2 foo;
14 return foo.answer();
15 }
16
17 extern "C" void
18 not_to_call_just_to_pull_in_the_stdcpp()
19 {
20 std::cout << "Hello There" << std::endl;
21 }