This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69016] In C++14 standard, function with auto as return and arguments returns result with the datatype of first argument only
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Dec 2015 17:21:49 +0000
- Subject: [Bug c++/69016] In C++14 standard, function with auto as return and arguments returns result with the datatype of first argument only
- Auto-submitted: auto-generated
- References: <bug-69016-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69016
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. this is not actually valid according to the C++ standard. C++14 only
supports auto for the return type, not the parameters. Using placeholder types
for the parameters as well is defined by the Concepts TS, which is only
supported on GCC trunk (which will be GCC 6).
So you are using a non-standard experimental feature in GCC 4.9, which
unfortunately is incomplete and doesn't work for multiple parameters. It might
be fixable, but you might have to wait for GCC 6 to use the Concetps support.