public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67656] New: [concepts] matched variadics in expression constraint report as unmatched
@ 2015-09-20 18:22 ryan.burn at gmail dot com
  0 siblings, 0 replies; only message in thread
From: ryan.burn at gmail dot com @ 2015-09-20 18:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67656
           Summary: [concepts] matched variadics in expression constraint
                    report as unmatched
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

In this code

/////////////////////////////////
template<class... Xs>                                                           
void consume(Xs&&...) {}                                                        

template<class... Xs>                                                           
struct A {                                                                      
  template<class... Ys>                                                         
    requires requires(Ys... ys) {                                               
      consume(Xs{ys}...);                                                       
    }                                                                           
  A(Ys&&... ys) {                                                               
  }                                                                             
};                                                                              

int main() {                                                                    
  A<int, long> a(55, 2);                                                        
  return 0;                                                                     
} 
/////////////////////////////////

"consume(Xs{ys}...)" is a valid expression so the constructor should be called,
but gcc gives a mismatched pack lengths error.

######### Error ##########
t2.cpp: In instantiation of ‘struct A<int, long int>’:
t2.cpp:15:17:   required from here
t2.cpp:8:14: error: mismatched argument pack lengths while expanding ‘Xs{ys}’
       consume(Xs{ys}...);
              ^
t2.cpp: In function ‘int main()’:
t2.cpp:15:23: error: no matching function for call to ‘A<int, long int>::A(int,
int)’
   A<int, long> a(55, 2);
                       ^
t2.cpp:10:3: note: candidate: A<Xs>::A(Ys&& ...) [with Ys = {int, int}; Xs =
{int, long int}]
   A(Ys&&... ys) {
   ^
t2.cpp:10:3: note:   constraints not satisfied
t2.cpp:5:8: note: candidate: constexpr A<int, long int>::A(const A<int, long
int>&)
 struct A {
        ^
t2.cpp:5:8: note:   candidate expects 1 argument, 2 provided
t2.cpp:5:8: note: candidate: constexpr A<int, long int>::A(A<int, long int>&&)
t2.cpp:5:8: note:   candidate expects 1 argument, 2 provided
>From gcc-bugs-return-497625-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 20 19:50:50 2015
Return-Path: <gcc-bugs-return-497625-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 91558 invoked by alias); 20 Sep 2015 19:50:50 -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 91523 invoked by uid 48); 20 Sep 2015 19:50:46 -0000
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/67648] No need to save callee-saved registers in interrupt handler
Date: Sun, 20 Sep 2015 19:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hjl.tools at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67648-4-u3wW2MAUhB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67648-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67648-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-09/txt/msg01603.txt.bz2
Content-length: 199

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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
We should update the "IRET" pattern to indicate which
registers should be preserved.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-20 18:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 18:22 [Bug c++/67656] New: [concepts] matched variadics in expression constraint report as unmatched ryan.burn at gmail 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).