inline thread_local int tla; inline int& get_tla() { return tla; } static thread_local int tlb; static int& get_tlb() { return tlb; } struct test { static const test& get_instance() { return instance; } static thread_local test instance; }; template struct test_template { static const test_template& get_instance() { return instance; } static thread_local test_template instance; template static const test_template& get_template_instance() { return template_instance; } template static thread_local test_template template_instance; }; template thread_local test_template test_template::instance; template template thread_local test_template test_template::template_instance; template struct test_template; template const test_template& test_template::get_template_instance();