Re: G++ refuses to compile simple, looking good code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanx! I got it.

On Fri, Jun 14, 2013 at 2:12 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 14 June 2013 10:30, Luchezar Belev wrote:
>> Hi,
>> i'm not a c++/template guru and i can't decide if this is really a
>> valid code or i have encountered a gcc bug:
>>
>> ------------------------------
>> template <class T> struct A {
>>   void *p;
>> };
>> template <class T> struct B : A<T> {
>>   void *foo() { return p; }
>> };
>> ------------------------------
>>
>> g++ says "error: 'p' was not declared in this scope".
>> microsoft's compiler is happy with the same code.
>>
>> Can anyone help?
>
> http://gcc.gnu.org/wiki/VerboseDiagnostics#dependent_base




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux