OS X 10.8.2
Xcode 4.5
Revision 5417
file ValueRef.h:
Line 563: m_ref_type was notdeclared in ths scope
Line 564, 569 - Use of undeclared identifier 'm_ref_type'
5417 build failed - Use of undeclared identifier m_ref_type
Moderator: Oberlus
-
- Space Floater
- Posts: 39
- Joined: Wed Nov 07, 2012 7:14 am
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: 5417 build failed - Use of undeclared identifier m_ref_t
mutable ReferenceType m_ref_type is declared in ValueRef::Variable<T> from which ValueRef::Statistic<T> is derived.
Try adding this-> before the instances of m_ref_type that are listed in the errors.
Try adding this-> before the instances of m_ref_type that are listed in the errors.
Re: 5417 build failed - Use of undeclared identifier m_ref_t
I also got build errors from that, until I changed the 3 offending citations from 'm_ref_type' to
this->m_ref_type by itself does not do the job on my machine.
Code: Select all
this->Variable<T>::m_ref_type
Last edited by Dilvish on Thu Nov 15, 2012 4:57 pm, edited 1 time in total.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: 5417 build failed - Use of undeclared identifier m_ref_t
well, I made the change after doing some quick reading on inheritance of protected members as opposed to public members; I can't recall seeing a specific rule that such would be necessary, but it was the impression I got, and it solved the problem.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: 5417 build failed - Use of undeclared identifier m_ref_t
It's nothing to do with protected vs. public inheritance; it's a somewhat obscure issue with inheritance from a templated base class that the MSVC compiler seems to not handle according to the C++ standard.
Everything I've read says just this->m_ref_type should be sufficient to fix the problem, though, and that the explicit Variable<T> reference in that context could cause some problems in some cases, so could you double-check that?
Everything I've read says just this->m_ref_type should be sufficient to fix the problem, though, and that the explicit Variable<T> reference in that context could cause some problems in some cases, so could you double-check that?
-
- Space Floater
- Posts: 39
- Joined: Wed Nov 07, 2012 7:14 am
Re: 5417 build failed - Use of undeclared identifier m_ref_t
Builded successful
Using both way.
Using both way.
- Attachments
-
- Снимок экрана 2012-11-15 в 21.09.44.png (104.11 KiB) Viewed 1441 times
Re: 5417 build failed - Use of undeclared identifier m_ref_t
I was going to post a bug report about this, but as I see, you guys have already sorted that one out. Perfect So I can put up the new test builds already (well, for OSX, Geoff has already put up the new test build for Win I noticed), I thought I'd had to postpone that due to this issue...Computer.Pers wrote:OS X 10.8.2
Xcode 4.5
Revision 5417
file ValueRef.h:
Line 563: m_ref_type was notdeclared in ths scope
Line 564, 569 - Use of undeclared identifier 'm_ref_type'
Re: 5417 build failed - Use of undeclared identifier m_ref_t
ya, as soon as I saw your suggestion, I double checked if the plain this->m_ref_type would work, but it got the same error as before popping up in my IDE (saying declaration not found).Geoff the Medio wrote:..so could you double-check that?
Just to be extra thorough, I now tried to go ahead and build it anyway (which had failed with plain m_ref_type), and it did indeed build successfully using just this->m_ref_type (I guess the compiler is smarter than my IDE's semantic analysis plugin)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0