public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63528] New: A variadic variable template cannot use the ::value of a variadic trait
@ 2014-10-13 19:35 ville.voutilainen at gmail dot com
  2014-10-15 17:42 ` [Bug c++/63528] " jason at gcc dot gnu.org
  2014-10-18  3:34 ` jason at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-10-13 19:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63528
           Summary: A variadic variable template cannot use the ::value of
                    a variadic trait
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ville.voutilainen at gmail dot com
                CC: jason at redhat dot com

Created attachment 33702
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33702&action=edit
Preprocessed testcase

#include <type_traits>

static_assert(std::is_constructible<int, int>::value, "");

template <class T, class... Args>
constexpr bool is_constructible_v = std::is_constructible<T, Args...>::value;

static_assert(is_constructible_v<int, int>, "");

Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local --enable-languages=c,c++ :
(reconfigured) ../configure --prefix=/usr/local --enable-languages=c,c++
Thread model: posix
gcc version 5.0.0 20141013 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-std=c++14' '-v' '-save-temps' '-c' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1plus -E -quiet -v
-D_GNU_SOURCE variable-template-isconstructible.cpp -mtune=generic
-march=x86-64 -std=c++14 -fpch-preprocess -o
variable-template-isconstructible.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/../../../../include/c++/5.0.0

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/../../../../include/c++/5.0.0/x86_64-unknown-linux-gnu

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/../../../../include/c++/5.0.0/backward
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-std=c++14' '-v' '-save-temps' '-c' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1plus -fpreprocessed
variable-template-isconstructible.ii -quiet -dumpbase
variable-template-isconstructible.cpp -mtune=generic -march=x86-64 -auxbase
variable-template-isconstructible -std=c++14 -version -o
variable-template-isconstructible.s
GNU C++ (GCC) version 5.0.0 20141013 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 5.0.0 20141013 (experimental), GMP version 5.0.2,
MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 5.0.0 20141013 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 5.0.0 20141013 (experimental), GMP version 5.0.2,
MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 50a3aa5021e9015dd41af708b42ad2d3
variable-template-isconstructible.cpp:8:1: error: non-constant condition for
static assertion
 static_assert(is_constructible_v<int, int>, "");
 ^
variable-template-isconstructible.cpp:8:1: error: the value of
‘is_constructible_v<int, <expression error> >’ is not usable in a constant
expression
variable-template-isconstructible.cpp:6:16: note: ‘is_constructible_v<int,
<expression error> >’ used in its own initializer
 constexpr bool is_constructible_v = std::is_constructible<T, Args...>::value;
>From gcc-bugs-return-463974-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 13 20:18:35 2014
Return-Path: <gcc-bugs-return-463974-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14592 invoked by alias); 13 Oct 2014 20:18:35 -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 14539 invoked by uid 48); 13 Oct 2014 20:18:30 -0000
From: "lucier at math dot purdue.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57622] -W -Wall -Werror -Wno-unused gives Wunused-parameter warning
Date: Mon, 13 Oct 2014 20:18: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.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: lucier at math dot purdue.edu
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57622-4-i2ZxuGehHi@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57622-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57622-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: 2014-10/txt/msg00995.txt.bz2
Content-length: 211

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

--- Comment #2 from lucier at math dot purdue.edu ---
This was fixed by the patch for PR61106 and backported to 4.8 and 4.9, so it
should be closed as FIXED.


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

* [Bug c++/63528] A variadic variable template cannot use the ::value of a variadic trait
  2014-10-13 19:35 [Bug c++/63528] New: A variadic variable template cannot use the ::value of a variadic trait ville.voutilainen at gmail dot com
@ 2014-10-15 17:42 ` jason at gcc dot gnu.org
  2014-10-18  3:34 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2014-10-15 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Oct 15 17:42:07 2014
New Revision: 216279

URL: https://gcc.gnu.org/viewcvs?rev=216279&root=gcc&view=rev
Log:
    PR c++/63528
    * pt.c (lookup_template_variable): Call coerce_template_parms.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/var-templ14.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


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

* [Bug c++/63528] A variadic variable template cannot use the ::value of a variadic trait
  2014-10-13 19:35 [Bug c++/63528] New: A variadic variable template cannot use the ::value of a variadic trait ville.voutilainen at gmail dot com
  2014-10-15 17:42 ` [Bug c++/63528] " jason at gcc dot gnu.org
@ 2014-10-18  3:34 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2014-10-18  3:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

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


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

end of thread, other threads:[~2014-10-18  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 19:35 [Bug c++/63528] New: A variadic variable template cannot use the ::value of a variadic trait ville.voutilainen at gmail dot com
2014-10-15 17:42 ` [Bug c++/63528] " jason at gcc dot gnu.org
2014-10-18  3:34 ` 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).