https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #14 from steve02081504 ---
(In reply to Andrew Pinski from comment #13)
> See http://womble.decadent.org.uk/c++/template-faq.html#disambiguation also
> to better understand the reason why GCC implements it this way and why it is
> ha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #13 from Andrew Pinski ---
See http://womble.decadent.org.uk/c++/template-faq.html#disambiguation also to
better understand the reason why GCC implements it this way and why it is hard
to implement this "extension" in all cases.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #12 from Andrew Pinski ---
Right and I am saying it is hard to support in a parser.
That is exactly why the language requires the template keyword here is to
distinguish and help out the parser.
Basically I am saying the whole point
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #11 from steve02081504 ---
(In reply to Andrew Pinski from comment #10)
> Take:
> type_info.can_convert_to
>
> The first part is dependent so when it goes to parse the next identifier,
> the parser does not know that can_convert_to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #10 from Andrew Pinski ---
Take:
type_info.can_convert_to
The first part is dependent so when it goes to parse the next identifier, the
parser does not know that can_convert_to is a template or not.
So it thinks < is the less than o
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #9 from steve02081504 ---
I don't quite understand why this is correct, can you elaborate on why and how
to change the code to bypass the error reporting?
Thanks.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
Andrew Pinski changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
steve02081504 changed:
What|Removed |Added
Version|unknown |12.2.0
--- Comment #7 from steve0208150
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #6 from steve02081504 ---
Created attachment 54696
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54696&action=edit
temp.cpp
(In reply to Andrew Pinski from comment #4)
> You provide a full example of what you want?
> Because
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #5 from Andrew Pinski ---
I suspect the thing you are requesting is having the template keyword as being
optional but I am not sure.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #4 from Andrew Pinski ---
You provide a full example of what you want?
Because right now your example your provided does not even compile with msvc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #3 from Andrew Pinski ---
(In reply to Andrew Pinski from comment #2)
> There is a defect report in this area of gcc.
Sorry c++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #2 from Andrew Pinski ---
There is a defect report in this area of gcc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #1 from steve02081504 ---
(Corrected code)
```c++
template
struct type_info_t{
//...
template
static constexpr bool can_convert_to=XXX;
//...
};
template
constexpr type_info_ttype_info{};
```
15 matches
Mail list logo