[Bug c++/38681] Internal compiler error. expr.c:6956 [Template instantiation with non-type value of member function ptr]

2008-12-31 Thread juvvij at gmail dot com


--- 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



[Bug c++/38681] Internal compiler error. expr.c:6956 [Template instantiation with non-type value of member function ptr]

2008-12-30 Thread juvvij at gmail dot com


--- Comment #2 from juvvij at gmail dot com  2008-12-31 07:43 ---
Created an attachment (id=17018)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17018&action=view)
Details of gcc from output of g++ -v -save-temps


-- 


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



[Bug c++/38681] Internal compiler error. expr.c:6956 [Template instantiation with non-type value of member function ptr]

2008-12-30 Thread juvvij at gmail dot com


--- Comment #1 from juvvij at gmail dot com  2008-12-31 07:42 ---
Created an attachment (id=17017)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17017&action=view)
Preprocessed test case that causes the compiler error.


-- 


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



[Bug c++/38681] New: Internal compiler error. expr.c:6956 [Template instantiation with non-type value of member function ptr]

2008-12-30 Thread juvvij at gmail dot com
While trying to reinvent some suitablu smart technique for routing Gtk's static
callbacks to object methods, I thought I had created a suitably brilliant
solution. Gcc could not digest it. While I am looking at smarter solutions from
boost or loki, I would like to see if I really was onto a workable solution.

I'm not sure if the triplet info above is useful enough. The bug posting
guidelines promised eternal shame if I didn't do my very best. So ading more
info, hopefully it is not all wasteful!

I have the as-packaged-for-ubuntu 8.10, g++-4.3.2 version.


-- 
   Summary: Internal compiler error. expr.c:6956 [Template
instantiation with non-type value of member function
ptr]
   Product: gcc
   Version: 4.3.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: juvvij at gmail dot com
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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