[cfe-dev] [llvm-commits] [llvm] r158787 - in /llvm/trunk: include/llvm/Analysis/LoopInfo.h include/llvm/Analysis/LoopInfoImpl.h lib/Analysis/LoopInfo.cpp lib/CodeGen/MachineLoopInfo.cpp
kim.grasman at gmail.com
Tue Jun 26 11:42:54 PDT 2012
On Wed, Jun 20, 2012 at 5:14 PM, Nico Weber <thakis at chromium.org> wrote:
> On Wed, Jun 20, 2012 at 4:37 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:
>> I'm almost sure MSVC is fine with extern template; I didn't know the
>> language feature existed until about a year ago, and my experiments
>> seemed to indicate it worked fine in VC 10.
> It doesn't work in MSVC2008.
(let me know if this is of no interest to the Clang list, and I'll
I found my scratch project and it turned out to be MSVC2008. I'm not
sure if I'm proving the existence of the same feature, but here's what
template< class T >
Holder(const T& t)
extern template Holder<int>;
extern template Holder<std::string>;
extern template Holder<float>;
std::cout << i.value << std::endl;
std::cout << s.value << std::endl;
std::cout << f.value << std::endl;
This compiles and yields;
holder.h(15) : warning C4231: nonstandard extension used : 'extern'
before template explicit instantiation
I haven't tried to dig into whether this does the right thing (i.e.
suppress generation of duplicate symbols), so maybe that's where it's
Is this different from what you expected?
More information about the cfe-dev