public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vexocide at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59135] New: Incorrect ambiguity in constexpr function overloads Date: Thu, 14 Nov 2013 15:47:00 -0000 [thread overview] Message-ID: <bug-59135-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59135 Bug ID: 59135 Summary: Incorrect ambiguity in constexpr function overloads Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vexocide at gmail dot com Created attachment 31220 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31220&action=edit minimal example Using built-in specs. COLLECT_GCC=g++-mp-4.8 COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin13/4.8.2/lto-wrapper Target: x86_64-apple-darwin13 Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/gcc48/work/gcc-4.8.2/configure --prefix=/opt/local --build=x86_64-apple-darwin13 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.8 --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc48 4.8.2_0' Thread model: posix gcc version 4.8.2 (MacPorts gcc48 4.8.2_0) g++-mp-4.8 test.cpp -o test -std=c++11 -Wall -Wextra -Wno-unused-parameter 0 s050414t 16:39 test.cpp: In function 'int main(int, char**)': test.cpp:22:28: error: call of overloaded 'bar(foo<int>, int, int)' is ambiguous bar<0>(foo<int>(), 1, 2); ^ test.cpp:22:28: note: candidates are: test.cpp:9:16: note: constexpr bool bar(T&&, Us&& ...) [with long unsigned int N = 0ul; T = foo<int>; Us = {int, int}] constexpr bool bar(T && t, Us &&... us) ^ test.cpp:15:16: note: constexpr bool bar(foo<T>&&, Us&& ...) [with long unsigned int N = 0ul; T = int; Us = {int, int}] constexpr bool bar(foo<T> && t, Us &&... us) ^ clang++-mp-3.4 test.cpp -o test -std=c++11 -Wall -Wextra -Wno-unused-parameter compiles the example as expected.
next reply other threads:[~2013-11-14 15:47 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-14 15:47 vexocide at gmail dot com [this message] 2013-11-20 9:11 ` [Bug c++/59135] " daniel.kruegler at googlemail dot com 2020-07-10 12:53 ` familiebaumanns at gmail dot com 2020-07-10 23:06 ` redi at gcc dot gnu.org 2021-08-28 1:54 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59135-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).