This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13461] Fails to access protected-ctor from public constant
- From: "ysbeer at af dot org dot za" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Dec 2003 11:47:53 -0000
- Subject: [Bug c++/13461] Fails to access protected-ctor from public constant
- References: <20031222103015.13461.ysbeer@af.org.za>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ysbeer at af dot org dot za 2003-12-22 11:47 -------
SOrry wrong example. The following one causes the prblem:
template <typename T,typename Y>
class C
{
public:
typedef C<T,Y> self;
static const self value;
protected:
C() {}
};
template <typename T,typename Y>
C<T,Y> const C<T,Y>::value;
int main()
{
C<int,int> const& x= C<int,int>::value;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13461