...but still dynamically linking against the core lib But the actual template instantiations happen now within the two compilation units, which are linked statically. When looking into the symbol table, we can see that the static field is emitted two times readelf -W target/clang-static-init -s | c++filt |less
30 lines
461 B
C++
30 lines
461 B
C++
#include "lib/test/run.hpp"
|
|
|
|
#include "proc/config-resolver.hpp"
|
|
#include "clang-static-init.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
using proc::ConfigResolver;
|
|
|
|
using ::test::Test;
|
|
using std::cout;
|
|
using std::endl;
|
|
|
|
|
|
int
|
|
main (int, char**)
|
|
{
|
|
cout << "\n.gulp.\n";
|
|
|
|
ConfigResolver& ref1 = ConfigResolver::instance();
|
|
|
|
ConfigResolver& sub2 = test::fabricate();
|
|
|
|
cout << "sub1="<< &ref1 << " sub2="<< &sub2 <<"\n";
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
|