Please consider the program below (backtrace included (gcc 4.0.2
(Ubuntu))). The program crashes when doing a std::slice on a valarray
containing a structure with a string element in it.
Is what I am doing there undefined behaviour? I've read 26.3.4 from
the standard but got no clues.
As you can
Consider the following snippet:
--8<---cut here---start->8---
namespace foo
{
class A
{
friend class B;
void bar (B);
};
class B {};
}
--8<---cut here---end--->8---
This compiles fine with:
g++ (GCC) 3.3.3