This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/8355] befriending a template specialization in another namespace


------- Additional Comments From gianni at mariani dot ws  2004-10-01 17:46 -------

gcc 3.4.2 complains about this as well:


namespace A {
template <typename T>
void func ()
{
    static T instance;
}
}


namespace blah {

class MyClass {
    friend void A::func<MyClass> ();

    MyClass () {} // private
};

}


int main ()
{
    A::func<blah::MyClass>();
}

friend_test.cpp:15: error: `void A::func()' should have been declared inside `A'

I suspect this is the same bug ?




-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gianni at mariani dot ws


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8355


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]