C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Templatized virtual functions
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-04-24 21:07:11


On Wednesday, 24 April 2019 09:16:50 PDT Ritwik Das via Std-Discussion wrote:
> So why would explicit instantiation of function templates work in this case:
>
> class Base
> {
> template<typename T>
> virtual int func() = 0;
> };

Because they wouldn't. The code above does not compile.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups