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++/38681] Internal compiler error. expr.c:6956 [Template instantiation with non-type value of member function ptr]



------- Comment #5 from juvvij at gmail dot com  2008-12-31 17:31 -------
>From the C++ standards doc (Latest download form the website) (excerpt listed
below), I thought that member functions could be allowed. I am not entirely
sure if *function* can also refer to *member-function*.

--------------------
4.  A non-type template-parameter shall have one of the following (optionally
cv-qualified) types:
    â?? integral or enumeration type,
    â?? pointer to object or pointer to function,
    â?? reference to object or reference to function,
    â?? pointer to member., or
    â?? in a constrained template (14.10), a type archetype T for which the
concept requirement std::NonTypeTemplateParamet
       is part of the templateâ??s requirements.
--------------------

Did I understand this wrong ? Does the correct interpretation of the standard
not allow for member-function-pointers as non-type arguments ?

The following links point to a different interpretation.

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101628

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=196204

http://objectmix.com/c/382443-samples-non-type-template-argument-other-than-integral-types.html


-- 


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


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