* [Bug c++/6709] typeof() cannot be used with the :: operator
[not found] <bug-6709-3116@http.gcc.gnu.org/bugzilla/>
@ 2007-02-17 20:02 ` pinskia at gcc dot gnu dot org
2007-08-12 2:05 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-17 20:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-02-17 20:02 -------
*** Bug 30837 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/6709] typeof() cannot be used with the :: operator
[not found] <bug-6709-3116@http.gcc.gnu.org/bugzilla/>
2007-02-17 20:02 ` pinskia at gcc dot gnu dot org
@ 2007-08-12 2:05 ` pinskia at gcc dot gnu dot org
2010-03-08 14:29 ` bangerth at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-12 2:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2007-08-12 02:05 -------
Hmm, I wonder what the current draft of C++0x says of decltype with this
respect (right now we reject it).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/6709] typeof() cannot be used with the :: operator
[not found] <bug-6709-3116@http.gcc.gnu.org/bugzilla/>
2007-02-17 20:02 ` pinskia at gcc dot gnu dot org
2007-08-12 2:05 ` pinskia at gcc dot gnu dot org
@ 2010-03-08 14:29 ` bangerth at gmail dot com
2010-03-08 14:40 ` redi at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: bangerth at gmail dot com @ 2010-03-08 14:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from bangerth at gmail dot com 2010-03-08 14:29 -------
*** Bug 43285 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/6709] typeof() cannot be used with the :: operator
[not found] <bug-6709-3116@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-03-08 14:29 ` bangerth at gmail dot com
@ 2010-03-08 14:40 ` redi at gcc dot gnu dot org
2010-03-08 14:46 ` redi at gcc dot gnu dot org
2010-03-08 16:00 ` manu at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-03-08 14:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from redi at gcc dot gnu dot org 2010-03-08 14:40 -------
(In reply to comment #8)
> Hmm, I wonder what the current draft of C++0x says of decltype with this
> respect (right now we reject it).
>
In Bug 43285 Comment 1 I said that I think decltype is invalid in this context,
which would make this a documentation bug for C++.
In the C++0x grammar:
simple-type-specifier:
::_opt nested-name-specifier_opt type-name
...
decltype ( expression )
nested-name-specifier:
type-name ::
namespace-name ::
nested-name-specifier identifier ::
nested-name-specifier template_opt simple-template-id ::
type-name:
class-name
enum-name
typedef-name
So decltype(expression) cannot appear in a nested-name-specifier
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/6709] typeof() cannot be used with the :: operator
[not found] <bug-6709-3116@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-03-08 14:40 ` redi at gcc dot gnu dot org
@ 2010-03-08 14:46 ` redi at gcc dot gnu dot org
2010-03-08 16:00 ` manu at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-03-08 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from redi at gcc dot gnu dot org 2010-03-08 14:46 -------
(In reply to comment #4)
> Just noticed this bug myself. You can work around it by creating
> a temporary typedef. E.g.,
>
> typedef typeof(obj) T;
> T::size_type s;
>
> Still annoying though.
This workaround is required for decltype, I don't see why typeof should be any
different.
The reason is that decltype(obj) doesn't declare a new type-name, it is only a
simple-type-specifier, which cannot appear in a nested-name-specifier.
The typedef workaround introduces a new type-name, which is allowed in a
nested-name-specifier.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/6709] typeof() cannot be used with the :: operator
[not found] <bug-6709-3116@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2010-03-08 14:46 ` redi at gcc dot gnu dot org
@ 2010-03-08 16:00 ` manu at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-03-08 16:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from manu at gcc dot gnu dot org 2010-03-08 15:59 -------
*** Bug 43285 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709
^ permalink raw reply [flat|nested] 10+ messages in thread