diff options
| author | ruki <[email protected]> | 2025-05-14 14:44:51 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-14 14:44:51 +0800 |
| commit | a68eff4a47e81b8ea430ee4f4a86d1fd8ccc7df9 (patch) | |
| tree | c0dd102305af8f462c5fcf22af5fa5fe6a937b32 /tests/projects/c++/modules/namespace/src/hello_impl.cpp | |
| parent | 29ee4b47144829d80fbb7c3fe429696fba94394c (diff) | |
| parent | bb8609c50ec1d82c50af24455ab904c4f0b7cd27 (diff) | |
Merge pull request #6435 from Arthapz/fix-namespaced-module-dep
(C++ modules support) fix _patch_sourcebatch when target and deps is in the same namespace
Diffstat (limited to 'tests/projects/c++/modules/namespace/src/hello_impl.cpp')
| -rw-r--r-- | tests/projects/c++/modules/namespace/src/hello_impl.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/projects/c++/modules/namespace/src/hello_impl.cpp b/tests/projects/c++/modules/namespace/src/hello_impl.cpp new file mode 100644 index 000000000..064afebad --- /dev/null +++ b/tests/projects/c++/modules/namespace/src/hello_impl.cpp @@ -0,0 +1,23 @@ +module; +#include <iostream> + +module hello; +import mod; + +void inner() { + std::cout << "hello world! data: " + << mod::foo() << std::endl; +} + +namespace hello { + int data__; + void say_hello() { ::inner(); } + + say::say(int data) : data_{data} { + } + + void say::hello() { + hello::data__ = data_; + ::inner(); + } +} |
