public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26605] using + function templates troubles
[not found] <bug-26605-4@http.gcc.gnu.org/bugzilla/>
@ 2013-09-02 9:44 ` paolo.carlini at oracle dot com
0 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-02 9:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26605
Bug 26605 depends on bug 21682, which changed state.
Bug 21682 Summary: Disallowed using declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21682
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/26605] using + function templates troubles
2006-03-08 13:43 [Bug c++/26605] New: enable_if + using troubles pcarlini at suse dot de
` (2 preceding siblings ...)
2006-03-08 22:36 ` pcarlini at suse dot de
@ 2006-03-10 9:38 ` pcarlini at suse dot de
3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-03-10 9:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pcarlini at suse dot de 2006-03-10 09:38 -------
I sent a message to the CWG reflector, and people kindly replied
(c++std-core-11367 to 11370). In a nutshell, 7.3.3/11 should be clarified for
function templates (a new issue has been opened), but apparently there is
consensus that Comment #1 below is invalid while Comment #0 is fine (because
the return types are different, and return types matter for function templates
[14.5.5.1p4]). However, the first snippet is actually the same issue of
c++/21682 and therefore I'm closing this one as duplicate.
*** This bug has been marked as a duplicate of 21682 ***
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26605
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/26605] using + function templates troubles
2006-03-08 13:43 [Bug c++/26605] New: enable_if + using troubles pcarlini at suse dot de
2006-03-08 16:20 ` [Bug c++/26605] using + function templates troubles pcarlini at suse dot de
2006-03-08 22:28 ` mmitchel at gcc dot gnu dot org
@ 2006-03-08 22:36 ` pcarlini at suse dot de
2006-03-10 9:38 ` pcarlini at suse dot de
3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-03-08 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pcarlini at suse dot de 2006-03-08 22:36 -------
Hum, I see. Therefore c++/21682 is also invalid? And EDG too, apparently ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26605
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/26605] using + function templates troubles
2006-03-08 13:43 [Bug c++/26605] New: enable_if + using troubles pcarlini at suse dot de
2006-03-08 16:20 ` [Bug c++/26605] using + function templates troubles pcarlini at suse dot de
@ 2006-03-08 22:28 ` mmitchel at gcc dot gnu dot org
2006-03-08 22:36 ` pcarlini at suse dot de
2006-03-10 9:38 ` pcarlini at suse dot de
3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-03-08 22:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from mmitchel at gcc dot gnu dot org 2006-03-08 22:28 -------
I think the code in Comment #1 is unambiguously invalid.
7.3.3/11 says says that a function declaration in namespace scope may not match
the declaration of a function introduced by a using declaration; i.e., the
following:
namespace N { void f(); };
using N::f;
void f();
is invalid. Making the functions templates does not change that. That
paragraph also makes clear that the code in Comment #9 is valid. I don't see
any DRs that suggest changes in this area.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26605
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/26605] using + function templates troubles
2006-03-08 13:43 [Bug c++/26605] New: enable_if + using troubles pcarlini at suse dot de
@ 2006-03-08 16:20 ` pcarlini at suse dot de
2006-03-08 22:28 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-03-08 16:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pcarlini at suse dot de 2006-03-08 16:20 -------
The below also works already (can make for an useful if ugly workaround, in
some cases, e.g., c++/21682):
namespace one
{
template<typename T>
void
fun(T);
}
namespace two
{
template<typename T>
void
fun(T);
}
using one::fun;
using two::fun;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26605
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-02 9:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-26605-4@http.gcc.gnu.org/bugzilla/>
2013-09-02 9:44 ` [Bug c++/26605] using + function templates troubles paolo.carlini at oracle dot com
2006-03-08 13:43 [Bug c++/26605] New: enable_if + using troubles pcarlini at suse dot de
2006-03-08 16:20 ` [Bug c++/26605] using + function templates troubles pcarlini at suse dot de
2006-03-08 22:28 ` mmitchel at gcc dot gnu dot org
2006-03-08 22:36 ` pcarlini at suse dot de
2006-03-10 9:38 ` pcarlini at suse dot de
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).