public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65415] New: using, base class static member function template, and decltype
@ 2015-03-13 2:12 rs2740 at gmail dot com
2015-03-13 10:26 ` [Bug c++/65415] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rs2740 at gmail dot com @ 2015-03-13 2:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65415
Bug ID: 65415
Summary: using, base class static member function template, and
decltype
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
>From http://stackoverflow.com/questions/29013260.
Minimized repro:
struct default_check
{
template<typename U> static int check(...);
};
struct is_addable : default_check
{
using default_check::check; // #1
using type = decltype(check<void>(0));
};
int main() {}
gcc HEAD 5.0.0 20150312 (experimental) reports
prog.cc:9:31: error: expected primary-expression before 'void'
using type = decltype(check<void>(0));
^
prog.cc:9:31: error: expected ')' before 'void'
prog.cc:9:16: error: expected type-specifier before 'decltype'
using type = decltype(check<void>(0));
^
i.e., for some reason the `check` brought in by `using` isn't found. Oddly
enough, commenting out line #1 makes the code compile.
(The original code in the linked SO question had a separate check() overload in
is_addable. In that case, lookup for some reason only found the is_addable
overload and not the base class one brought in by `using`)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/65415] using, base class static member function template, and decltype
2015-03-13 2:12 [Bug c++/65415] New: using, base class static member function template, and decltype rs2740 at gmail dot com
@ 2015-03-13 10:26 ` redi at gcc dot gnu.org
2015-03-25 14:38 ` mpolacek at gcc dot gnu.org
2015-05-22 9:51 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-03-13 10:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65415
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-13
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed. EDG and Clang both accept it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/65415] using, base class static member function template, and decltype
2015-03-13 2:12 [Bug c++/65415] New: using, base class static member function template, and decltype rs2740 at gmail dot com
2015-03-13 10:26 ` [Bug c++/65415] " redi at gcc dot gnu.org
@ 2015-03-25 14:38 ` mpolacek at gcc dot gnu.org
2015-05-22 9:51 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-25 14:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65415
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Trunk accepts the code since r221478.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/65415] using, base class static member function template, and decltype
2015-03-13 2:12 [Bug c++/65415] New: using, base class static member function template, and decltype rs2740 at gmail dot com
2015-03-13 10:26 ` [Bug c++/65415] " redi at gcc dot gnu.org
2015-03-25 14:38 ` mpolacek at gcc dot gnu.org
@ 2015-05-22 9:51 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-05-22 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65415
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Closing as Dup. We may want to add the testcase, though, it's slightly
different.
*** This bug has been marked as a duplicate of bug 65061 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-22 9:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 2:12 [Bug c++/65415] New: using, base class static member function template, and decltype rs2740 at gmail dot com
2015-03-13 10:26 ` [Bug c++/65415] " redi at gcc dot gnu.org
2015-03-25 14:38 ` mpolacek at gcc dot gnu.org
2015-05-22 9:51 ` 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).