public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26205] pointer to member template parameter can't be null
       [not found] <bug-26205-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-15 18:05 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-15 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|gcc-bugs at gcc dot gnu.org        |
         Resolution|---                         |DUPLICATE

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Nothing to fix here, besides maybe the casting bit in c++98 mode which is
PR10541.

*** This bug has been marked as a duplicate of bug 10541 ***


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/26205] pointer to member template parameter can't be null
  2006-02-10  1:08 [Bug c++/26205] New: " jeffp at doomsday dot org
  2006-02-10  1:19 ` [Bug c++/26205] " pinskia at gcc dot gnu dot org
  2006-02-15 19:37 ` bangerth at dealii dot org
@ 2006-02-15 19:55 ` jeffp at doomsday dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jeffp at doomsday dot org @ 2006-02-15 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jeffp at doomsday dot org  2006-02-15 19:55 -------
The casting work-around doesn't compile under GCC.  It requires that the
template parameter be a constant-expression (which is true), which results in
the following error:

error: a casts to a type other than an integral or enumeration type cannot
appear in a constant-expression

I have yet to be able to figure out a work-around.  MSVC allows the cast, but
works with or without it.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/26205] pointer to member template parameter can't be null
  2006-02-10  1:08 [Bug c++/26205] New: " jeffp at doomsday dot org
  2006-02-10  1:19 ` [Bug c++/26205] " pinskia at gcc dot gnu dot org
@ 2006-02-15 19:37 ` bangerth at dealii dot org
  2006-02-15 19:55 ` jeffp at doomsday dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2006-02-15 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bangerth at dealii dot org  2006-02-15 19:37 -------
icc gives essentially the same error as that one mentioned by Andrew for
Comeau (not surprisingly). As a workaround, you can always use an explicit
cast:
    Test<Simple, (int Simple::*)0> t2;


I believe the code is ok anyway, see 4.11/1.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-15 19:37:18
               date|                            |


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/26205] pointer to member template parameter can't be null
  2006-02-10  1:08 [Bug c++/26205] New: " jeffp at doomsday dot org
@ 2006-02-10  1:19 ` pinskia at gcc dot gnu dot org
  2006-02-15 19:37 ` bangerth at dealii dot org
  2006-02-15 19:55 ` jeffp at doomsday dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-10  1:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-02-10 01:19 -------
Comeau gives the following error:


"ComeauTest.c", line 19: error: argument of type "int" is incompatible with
          template parameter of type "int Simple::*"
      Test<Simple, NULL> t2;             // error, but should not be (works in
                   ^


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-15 18:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-26205-4@http.gcc.gnu.org/bugzilla/>
2013-11-15 18:05 ` [Bug c++/26205] pointer to member template parameter can't be null paolo.carlini at oracle dot com
2006-02-10  1:08 [Bug c++/26205] New: " jeffp at doomsday dot org
2006-02-10  1:19 ` [Bug c++/26205] " pinskia at gcc dot gnu dot org
2006-02-15 19:37 ` bangerth at dealii dot org
2006-02-15 19:55 ` jeffp at doomsday dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).