This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17501] [3.4/4.0 regression] Confusion with member templates
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2004 15:01:49 -0000
- Subject: [Bug c++/17501] [3.4/4.0 regression] Confusion with member templates
- References: <20040915150453.17501.larsbj@gullik.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-09-16 15:01 -------
Here's my final testcase:
-----------------------
struct S {
template<typename> struct Result {
typedef int type;
};
};
template<bool> struct F;
template<> struct F<false> {
typedef S type;
};
template<bool Condition> struct IF {
typedef typename F<Condition>::type select;
typedef typename select::template Result<int>::type type;
};
template struct IF<false>;
-----------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c y.cc
y.cc:15: error: `type' in namespace `::' does not name a type
It should compile, but doesn't. This is clearly a bug, and a regression
on both mainline and the 3.4 branch. (The 3.4 branch compiler above
hasn't been updated in a few days, while the mainline compiler is
top of tree.)
W.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Known to fail| |3.4.3 4.0.0
Known to work| |3.4.2
Last reconfirmed|0000-00-00 00:00:00 |2004-09-16 15:01:46
date| |
Summary|Failing to compile code |[3.4/4.0 regression]
|using boost bind/signal |Confusion with member
| |templates
Target Milestone|--- |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17501