------- Comment #4 from bangerth at dealii dot org  2007-10-12 15:21 -------
(In reply to comment #3)
> (I'm told that) these two function-style casts compile fine on 4.2.1:
> 
> template <bool cond>
> struct A {
> };
> 
> A<bool (2)> y;
> A<bool (2 < 1)> z;

Uh, indeed, I see. This is weird indeed. So in other words, these codes
compile:
------------------
  template <bool> struct A {};
  A<bool(1)> a;
  A<bool(1<2)> b;
  A<(bool)(1>2)> c;
------------------
but this one doesn't:
------------------
  template <bool> struct A {};
  A<bool(1>2)> b;
------------------
This is indeed very weird: it only fails with the function-style cast
and the greater-than sign...

Since this worked in gcc 3.3, this is a regression.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
      Known to fail|                            |4.1.2 4.2.0 4.3.0
      Known to work|                            |3.3.6
   Last reconfirmed|0000-00-00 00:00:00         |2007-10-12 15:21:49
               date|                            |
            Summary|function-style cast not     |[4.1/4.2/4.3 regression]
                   |allowed in template argument|function-style cast and '>'
                   |                            |not allowed in template
                   |                            |argument
   Target Milestone|---                         |4.2.3


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

Reply via email to