summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/dependence/src/hello_impl.cpp
blob: 5dbc009f4bb7c5242be4343d2df9bd7e9fb5532c (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 hello;

#include <iostream>
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();
    }
}