public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66834] New: [concepts] concept parameter kind mismatch causes hard error
@ 2015-07-10 17:56 eric.niebler at gmail dot com
  2015-07-11  2:48 ` [Bug c++/66834] " jason at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: eric.niebler at gmail dot com @ 2015-07-10 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66834
           Summary: [concepts] concept parameter kind mismatch causes hard
                    error
           Product: gcc
           Version: c++-concepts
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

Before rev 225651 (the fix for #66758), the following worked. It no longer
does. Not sure if it's legit.

template <class From, class To>
concept bool ExplicitlyConvertible =
  requires (From&& f) {
    static_cast<To>((From&&)f);
  };

template <class T, class... Args>
concept bool Constructible =
  ExplicitlyConvertible<Args..., T> ||
  requires (Args&&... args) {
    T{((Args&&)(args))...};
  };

template <class T, class...Args>
constexpr bool constructible() { return false; }

Constructible{T, ...Args}
constexpr bool constructible() { return false; }

int main() {}


Yields:

/cygdrive/c/Users/eric/Code/cmcstl2/test/iterator.cpp: In function ‘constexpr
bool Constructible()’:
/cygdrive/c/Users/eric/Code/cmcstl2/test/iterator.cpp:9:5: error: pack
expansion argument for non-pack parameter ‘From’ of concept ‘template
<class From, class To> constexpr const bool ExplicitlyConvertible<From, To>’
     ExplicitlyConvertible<Args..., T> ||
     ^
/cygdrive/c/Users/eric/Code/cmcstl2/test/iterator.cpp:1:11: note: declared here
 template< class From, class To >
           ^
>From gcc-bugs-return-492008-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jul 10 18:36:43 2015
Return-Path: <gcc-bugs-return-492008-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129817 invoked by alias); 10 Jul 2015 18:36:42 -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 125011 invoked by uid 48); 10 Jul 2015 18:36:38 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/54521] g++ fails to call explicit constructors in the second step of copy initialization
Date: Fri, 10 Jul 2015 18:36: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: 4.7.1
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to
Message-ID: <bug-54521-4-RIo3ZhZOXk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-54521-4@http.gcc.gnu.org/bugzilla/>
References: <bug-54521-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-07/txt/msg00898.txt.bz2
Content-length: 468

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

end of thread, other threads:[~2020-10-15 18:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 17:56 [Bug c++/66834] New: [concepts] concept parameter kind mismatch causes hard error eric.niebler at gmail dot com
2015-07-11  2:48 ` [Bug c++/66834] " jason at gcc dot gnu.org
2015-07-11 15:32 ` andrew.n.sutton at gmail dot com
2015-07-11 17:29 ` eric.niebler at gmail dot com
2015-07-11 17:53 ` eric.niebler at gmail dot com
2015-07-11 19:09 ` eric.niebler at gmail dot com
2015-07-13 20:16 ` jason at gcc dot gnu.org
2015-07-13 20:31 ` jason at gcc dot gnu.org
2015-07-14  4:10 ` jason at gcc dot gnu.org
2015-07-14  4:11 ` jason at gcc dot gnu.org
2015-07-14 13:33 ` andrew.n.sutton at gmail dot com
2015-07-14 14:47 ` jason at gcc dot gnu.org
2015-07-17 17:43 ` jason at gcc dot gnu.org
2015-08-04 13:37 ` jason at gcc dot gnu.org
2020-10-15 18:54 ` [Bug c++/66834] [concepts] variadic concepts and DR 1430 ppalka 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).