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]

Re: c++/7166: Non-type template instantiation fails for pointer types


Synopsis: Non-type template instantiation fails for pointer types

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sun Jun 30 02:57:04 2002
State-Changed-Why:
    not a bug. Like the error says, you are attempting to
    instantiate a template on a non-externally visible object
    (the thing pointer to *by* strPointer). The array case
    works becuase of array->pointer decay - the thing pointed
    to is the first array element, and that does have external
    linkage. May be you mean to write
    	template <char const *&r> class Foo {};
    which would be acceptable for the first case, as then you're
    binding to the pointer variable.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7166


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