[Bug c++/66333] New: [C++14] Static constexpr template

2015-05-28 Thread cypherpu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66333

Bug ID: 66333
   Summary: [C++14] Static constexpr template
   Product: gcc
   Version: 5.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: cypherpu at gmail dot com
  Target Milestone: ---

Created attachment 35650
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35650&action=edit
line colTest2 fails, line colTest4 succeeds

In the attached file, line colTest2 fails with:

gcc_constexpr_bug.cpp:36:99: error: ‘ColumnObject >{&Staff::nickname_, ((const char*)"nick_name")}’ is
not a constant expression
 static constexpr auto colTest2=ColumnObject(&Staff::nickname_,"nick_name");

Note that std::basic_string is only used in the declaration of a member
pointer. Also note that although this line fails, a very similar line succeeds
(colTest4 in main()).

[]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--disable-libgcj --with-default-libstdcxx-abi=c++98 --with-isl --enable-libmpx
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 5.1.1 20150422 (Red Hat 5.1.1-1) (GCC)

[Bug c++/66333] [C++14] Static constexpr template

2015-12-17 Thread cypherpu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66333

--- Comment #1 from cypherpu at gmail dot com ---
This program now compiles under gcc 5.3.1 (Red Hat 5.3.1-2).

Thanks.