https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80564
--- Comment #5 from r.hl at gmx dot net ---
See also the discussion on Phabricator: https://reviews.llvm.org/D32824
I agree; AFAICS [func.bind.bind] is clear on this: the type of the Func
object used to call the member operator() is non-const
++
Assignee: unassigned at gcc dot gnu.org
Reporter: R.HL at gmx dot net
GCC simply ignores the fact, that a private member is inaccessible:
class A
{
struct B {};
};
template
using C = A::B; // Already the declaration of this alias template is ill-formed
int main()
{
C c1;
C
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60705
--- Comment #2 from Robert Haberlach ---
In this case the nested-name-specifier is not dependent upon any template
argument. Thank you for the link, i didn't know that report yet.
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: R.HL at gmx dot net
struct A
{
const int b;
};
union U
{
A a;
};
int main()
{
U a = {1, 1};
}
Fails to compile using -std=c++03, although it should. Consider that no special
member function apart from the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64428
--- Comment #2 from R.HL at gmx dot net ---
That was a typo, I quickly modified the example before submitting it. It should
be
U u = {1};
++
Assignee: unassigned at gcc dot gnu.org
Reporter: R.HL at gmx dot net
This code
#include
void bar(void*) {}
struct foo
{
operator std::nullptr_t()
{
return nullptr;
}
};
int main()
{
bar(foo());
}
Does not compile with GCC 4.9.1 (neither -std=c++11
++
Assignee: unassigned at gcc dot gnu.org
Reporter: R.HL at gmx dot net
int arr[] {1, 2, 3};
for (int i = 5: arr)
std::cout << i << ", ";
Compiles, while it shouldn't. A warning message suggests that GCC ignores the
loop completely.