[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 220284] New: function of template class not correctly resolved
From: Thorben Kröger <thorbenk () gmx ! net>
Date: 2009-12-27 15:48:40
Message-ID: bug-220284-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=220284
Summary: function of template class not correctly resolved when
template parameter is set in a #define block
Product: kdevelop
Version: unspecified
Platform: Compiled Sources
OS/Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kdevelop-bugs@kdevelop.org
ReportedBy: thorbenk@gmx.net
Version: svn from 24.12.2009 (using Devel)
Installed from: Compiled sources
Here is a small example program, see the comments about what goes wrong. I also
attach this for convenience:
#ifdef NDEBUG
const bool NO_DEBUG = true;
#else
const bool NO_DEBUG = false;
#endif
template<bool B> class Test;
template<> class Test<false> {
public:
void test() {}
};
template<> class Test<true> {
public:
void test() {}
};
int main() {
NO_DEBUG; // <-- kdevelop knows that this evaluates to false here
Test<NO_DEBUG> test1; // <--- even here, kdevelop shows me "false" on hover
test1.test(); // <-- does NOT work, semantic analysis claims "declaration
not found"
Test<true> test2;
test2.test(); // <-- now, this DOES work, no problem for kdevelop here...
}
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic