: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: mrlika at gmail dot com
This completely valid C++11 code does not compile when T is void.
template
void f() {
std::unique_ptr sp;
std::shared_ptr up(std:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58839
--- Comment #2 from Andriy Lysnevych ---
Hi Paolo,
You are right. It is not yours commit but next one.
__r.get() returns T* and construction *__r.get() works for any type except the
case when T=void. It causes dereferencing of void pointer that
++
Assignee: unassigned at gcc dot gnu.org
Reporter: mrlika at gmail dot com
Target Milestone: ---
I use out-of-the-box GCC 5.2.1 in Ubuntu 15.10:
gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
This code makes GCC crash when I define standard --std=c++14 or --std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70353
--- Comment #3 from Andriy Lysnevych ---
static_assert is not required. This code also crashes:
#include
constexpr int ce(int r) {
assert(r == 3);
return r;
}
const auto c = ce(3);
Problem is in assert called from constexpr function.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70353
--- Comment #8 from Andriy Lysnevych ---
Smaller test case:
constexpr const char* ce ()
{
return __func__;
}
const char* c = ce ();