https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67928
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-21
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed:
$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic -O2 -std=c++14 67928.cc
67928.cc: In instantiation of ‘void print(const T&, const types& ...) [with T =
test; types = {int}; unsigned int U = 8]’:
67928.cc:20:21: required from here
67928.cc:7:22: warning: unused parameter ‘arg1’ [-Wunused-parameter]
void print( const T& arg1, const types&... args ) {
^~~~
67928.cc: In instantiation of ‘void print(const T&, const types& ...) [with T =
int; types = {}]’:
67928.cc:8:6: required from ‘void print(const T&, const types& ...) [with T =
test; types = {int}; unsigned int U = 8]’
67928.cc:20:21: required from here
67928.cc:12:22: warning: unused parameter ‘arg1’ [-Wunused-parameter]
void print( const T& arg1, const types&... args ) {
^~~~
$ /sw/opt/llvm-3.1/bin/clang++ -c -Wall -Wextra -pedantic -O2 -std=c++11
67928.cc
67928.cc:7:22: warning: unused parameter 'arg1' [-Wunused-parameter]
void print( const T& arg1, const types&... args ) {
^
67928.cc:12:22: warning: unused parameter 'arg1' [-Wunused-parameter]
void print( const T& arg1, const types&... args ) {
^
67928.cc:20:4: error: call to 'print' is ambiguous
print( test{}, 1 );
^~~~~
67928.cc:7:6: note: candidate function [with T = test, types = <int>, U = 8]
void print( const T& arg1, const types&... args ) {
^
67928.cc:12:6: note: candidate function [with T = test, types = <int>]
void print( const T& arg1, const types&... args ) {
^
2 warnings and 1 error generated.
$