Bug 10854 - "XXX is private within this context" when trying to specialize private member template
Summary: "XXX is private within this context" when trying to specialize private member...
Status: RESOLVED DUPLICATE of bug 10849
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Giovanni Bajo
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2003-05-19 09:26 UTC by derrick
Modified: 2003-06-12 00:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description derrick 2003-05-19 09:26:00 UTC
When this code is compiled:
class X {
private:
  template<bool T>
  struct Y;
};

template<>
struct X::Y<false> {
};

gcc 3.3 gives the following error:
privatetest.cc:4: error: `template<bool T> struct X::Y' is private
privatetest.cc:8: error: within this context

Previous versions of gcc accept the code (well, 3.1 and 3.2.2 definitely).

Release:
gcc-3.3
Comment 1 Giovanni Bajo 2003-05-19 09:56:33 UTC
*** This bug has been marked as a duplicate of 10849 ***