1//Header.h
2#include <string>
3
4namespace Test
5{
6 namespace old_ns
7 {
8 std::string Func() { return std::string("Hello from old"); }
9 }
10
11 inline namespace new_ns
12 {
13 std::string Func() { return std::string("Hello from new"); }
14 }
15}
16
17#include "header.h"
18#include <string>
19#include <iostream>
20
21int main()
22{
23 using namespace Test;
24 using namespace std;
25
26 string s = Func();
27 std::cout << s << std::endl; // "Hello from new"
28 return 0;
29}
30