public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64603] New: [5 Regression] bogus error "no matching function for call to ..." with templates
@ 2015-01-14 21:22 janus at gcc dot gnu.org
  2015-01-14 21:52 ` [Bug c++/64603] " ville.voutilainen at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2015-01-14 21:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64603

            Bug ID: 64603
           Summary: [5 Regression] bogus error "no matching function for
                    call to ..." with templates
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: janus at gcc dot gnu.org

Created attachment 34452
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34452&action=edit
source file

The attached source file compiles fine with g++ 4.9.1, 4.8.3 and 4.7.4.

However, it is rejected with current trunk builds:

$ g++-5.0 logging.cc -std=c++11
logging.cc: In function ‘void create_all_loggers()’:
logging.cc:33:62: error: no matching function for call to
‘create_all_loggers_impl()’
   create_all_loggers_impl<std::tuple_size<AreaTuple>::value>();
                                                              ^
logging.cc:26:52: note: candidate: template<long unsigned int index, int
<anonymous> > typename std::enable_if<(index == 0)>::type
create_all_loggers_impl()
 inline typename std::enable_if<(index == 0)>::type create_all_loggers_impl()
{}
                                                    ^
logging.cc:26:52: note:   template argument deduction/substitution failed:
logging.cc: In substitution of ‘template<long unsigned int index, int
<anonymous> > typename std::enable_if<(index == 0)>::type
create_all_loggers_impl() [with long unsigned int index = 1ul; int <anonymous>
= <missing>]’:
logging.cc:33:62:   required from here
logging.cc:26:52: error: no type named ‘type’ in ‘struct std::enable_if<false,
void>’
logging.cc:30:52: note: candidate: template<long unsigned int index, int
longest_name> typename std::enable_if<(index != 0)>::type
create_all_loggers_impl()
 inline typename std::enable_if<(index != 0)>::type create_all_loggers_impl()
{}
                                                    ^
logging.cc:30:52: note:   template argument deduction/substitution failed:
logging.cc:29:61:   in constexpr expansion of ‘find_longest_logger_name<1ul>()’
logging.cc:29:62: error: ‘(((int)(((unsigned int)5ul) + 4294967295u)) > 0)’ is
not a constant expression
           int longest_name = find_longest_logger_name<index>()>
                                                              ^
logging.cc:29:62: note: in template argument for type ‘int’
>From gcc-bugs-return-473250-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 21:35:26 2015
Return-Path: <gcc-bugs-return-473250-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14369 invoked by alias); 14 Jan 2015 21:35:24 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 14313 invoked by uid 48); 14 Jan 2015 21:35:16 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64356] Some constexpr expressions not recognized as constexpr
Date: Wed, 14 Jan 2015 21:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution target_milestone
Message-ID: <bug-64356-4-lviBiuJO6U@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64356-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64356-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg01244.txt.bz2
Content-length: 475

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd356

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-01-23 16:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-14 21:22 [Bug c++/64603] New: [5 Regression] bogus error "no matching function for call to ..." with templates janus at gcc dot gnu.org
2015-01-14 21:52 ` [Bug c++/64603] " ville.voutilainen at gmail dot com
2015-01-15  8:31 ` janus at gcc dot gnu.org
2015-01-15  9:29 ` rguenth at gcc dot gnu.org
2015-01-15 20:00 ` janus at gcc dot gnu.org
2015-01-19 14:52 ` jakub at gcc dot gnu.org
2015-01-19 15:43 ` janus at gcc dot gnu.org
2015-01-21 21:26 ` jason at gcc dot gnu.org
2015-01-21 21:57 ` jason at gcc dot gnu.org
2015-01-23 16:40 ` jason at gcc dot gnu.org

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).