[cfe-dev] Incorrect(?) compile time error - inheriting member function template (using base::f; )

Fernando Pelliccioni fpelliccioni at gmail.com
Fri May 4 11:41:34 PDT 2012


Thanks Doug,

I have seen the response and the paragraph in the standard.
Now that I think, it is quite logical.

Sorry for the bug report before talking.

I'm reporting it to where it belongs (GCC).

Thanks and regards,
Fernando.

On Fri, May 4, 2012 at 3:13 PM, Douglas Gregor <dgregor at apple.com> wrote:

>
> On May 4, 2012, at 6:17 AM, Fernando Pelliccioni <fpelliccioni at gmail.com>
> wrote:
>
> Is this compile time error correct?
>
> g++ 4.6.3 compiles fine
>
>
> Here is the code:
> http://pastebin.com/jUQ802Kh
>
>
> $ clang++ --version
> clang version 3.1 (trunk 155038)
> Target: i386-pc-linux-gnu
> Thread model: posix
>
> $ clang++ -std=c++11 clang_error.cpp
> clang_error.cpp:55:18: error: no matching member function for call to 'get'
>         std::cout << ov.get<double>() << std::endl;
>                      ~~~^~~~~~~~~~~
> clang_error.cpp:43:2: note: candidate template ignored: substitution failure
> [with T2 = double]
>         get()
>         ^
> 1 error generated.
>
>
> As noted in the corresponding bug report (
> http://llvm.org/bugs/show_bug.cgi?id=12737), Clang is correct to reject
> this code.
>
> - Doug
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120504/8da68082/attachment.html>


More information about the cfe-dev mailing list