public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58435] New: Applying a type transformation to a list: const ignored
@ 2013-09-16 14:30 iavr at image dot ntua.gr
2013-09-16 15:37 ` [Bug c++/58435] " redi at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: iavr at image dot ntua.gr @ 2013-09-16 14:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
Bug ID: 58435
Summary: Applying a type transformation to a list: const
ignored
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: iavr at image dot ntua.gr
The following applies a type transformation F to a list L of types T..., in
particular for a transformation that adds "const":
------------------------------------------------------------------------
template <template <typename...> class F, typename P> struct apply;
template <
template <typename...> class F,
template <typename...> class L, typename... T
> struct apply <F, L <T...> > { typedef L <F <T>...> type; };
template <typename T> using map = const T;
template <typename> struct A { };
template <typename> void dummy();
int main() { dummy <apply <map, A <int> >::type>(); }
------------------------------------------------------------------------
It fails to link because of
undefined reference to `void dummy<A<int> >()'
instead of the expected
undefined reference to `void dummy<A<const int> >()'
i.e., "const" is ignored. It works for any other transformation I have tried.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
@ 2013-09-16 15:37 ` redi at gcc dot gnu.org
2013-09-16 18:27 ` paolo.carlini at oracle dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2013-09-16 15:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-09-16
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
2013-09-16 15:37 ` [Bug c++/58435] " redi at gcc dot gnu.org
@ 2013-09-16 18:27 ` paolo.carlini at oracle dot com
2013-09-16 19:29 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-16 18:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Reduced:
template<typename T, typename U>
struct same { static const bool value = false; };
template<typename T>
struct same<T, T> { static const bool value = true; };
template <template <typename> class F, typename T> struct apply
{ typedef F<T> type; };
template <typename T> using map = const T;
static_assert(same<apply<map, int>::type, const int>::value, "");
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
2013-09-16 15:37 ` [Bug c++/58435] " redi at gcc dot gnu.org
2013-09-16 18:27 ` paolo.carlini at oracle dot com
@ 2013-09-16 19:29 ` paolo.carlini at oracle dot com
2013-09-17 18:39 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-16 19:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Target Milestone|--- |4.9.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
` (2 preceding siblings ...)
2013-09-16 19:29 ` paolo.carlini at oracle dot com
@ 2013-09-17 18:39 ` paolo.carlini at oracle dot com
2013-09-17 18:40 ` paolo at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-17 18:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
` (3 preceding siblings ...)
2013-09-17 18:39 ` paolo.carlini at oracle dot com
@ 2013-09-17 18:40 ` paolo at gcc dot gnu.org
2013-09-19 18:26 ` iavr at image dot ntua.gr
2013-09-19 18:31 ` paolo.carlini at oracle dot com
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-09-17 18:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Sep 17 17:46:03 2013
New Revision: 202662
URL: http://gcc.gnu.org/viewcvs?rev=202662&root=gcc&view=rev
Log:
/cp
2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58435
* pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
the cp_type_quals (r) too.
/testsuite
2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58435
* g++.dg/cpp0x/alias-decl-38.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
` (4 preceding siblings ...)
2013-09-17 18:40 ` paolo at gcc dot gnu.org
@ 2013-09-19 18:26 ` iavr at image dot ntua.gr
2013-09-19 18:31 ` paolo.carlini at oracle dot com
6 siblings, 0 replies; 8+ messages in thread
From: iavr at image dot ntua.gr @ 2013-09-19 18:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
--- Comment #6 from iavr at image dot ntua.gr ---
(In reply to paolo@gcc.gnu.org from comment #5)
> Author: paolo
> Date: Tue Sep 17 17:46:03 2013
> New Revision: 202662
>
Hi,
Thanks a lot for your immediate response. However, I have to report that
exactly the same problem occurs for "volatile" and "const volatile", as I just
found out. Maybe these have been fixed as well already?
Yannis
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58435] Applying a type transformation to a list: const ignored
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
` (5 preceding siblings ...)
2013-09-19 18:26 ` iavr at image dot ntua.gr
@ 2013-09-19 18:31 ` paolo.carlini at oracle dot com
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-19 18:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58435
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Of course. Just look at the testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-09-19 18:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-16 14:30 [Bug c++/58435] New: Applying a type transformation to a list: const ignored iavr at image dot ntua.gr
2013-09-16 15:37 ` [Bug c++/58435] " redi at gcc dot gnu.org
2013-09-16 18:27 ` paolo.carlini at oracle dot com
2013-09-16 19:29 ` paolo.carlini at oracle dot com
2013-09-17 18:39 ` paolo.carlini at oracle dot com
2013-09-17 18:40 ` paolo at gcc dot gnu.org
2013-09-19 18:26 ` iavr at image dot ntua.gr
2013-09-19 18:31 ` paolo.carlini at oracle dot com
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).