summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/namespace/src/hello_impl.cpp
blob: 064afebaddb350ae89ce777219f248399c2b6485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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();
    }
}