#include <vector>
struct foo
{
foo() {}
private:
foo(const foo&);
void operator=(const foo&);
};
int main()
{
std::vector<foo> v(100);
return v.size();
}
I2luY2x1ZGUgPHZlY3Rvcj4KCnN0cnVjdCBmb28KewogICAgZm9vKCkge30KcHJpdmF0ZToKICAgIGZvbyhjb25zdCBmb28mKTsKICAgIHZvaWQgb3BlcmF0b3I9KGNvbnN0IGZvbyYpOwp9OwoKaW50IG1haW4oKQp7CiAgICBzdGQ6OnZlY3Rvcjxmb28+IHYoMTAwKTsKICAgIHJldHVybiB2LnNpemUoKTsKfQ==
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/vector:63:0,
from prog.cpp:1:
prog.cpp: In function 'void std::_Construct(_T1*, _T2&&) [with _T1 = foo, _T2 = const foo&]':
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_uninitialized.h:248:3: instantiated from 'static void std::__uninitialized_fill_n<<anonymous> >::uninitialized_fill_n(_ForwardIterator, _Size, const _Tp&) [with _ForwardIterator = foo*, _Size = unsigned int, _Tp = foo, bool <anonymous> = false]'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_uninitialized.h:284:7: instantiated from 'void std::uninitialized_fill_n(_ForwardIterator, _Size, const _Tp&) [with _ForwardIterator = foo*, _Size = unsigned int, _Tp = foo]'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_uninitialized.h:379:7: instantiated from 'void std::__uninitialized_fill_n_a(_ForwardIterator, _Size, const _Tp&, std::allocator<_Tp2>&) [with _ForwardIterator = foo*, _Size = unsigned int, _Tp = foo, _Tp2 = foo]'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_vector.h:1039:2: instantiated from 'void std::vector<_Tp, _Alloc>::_M_fill_initialize(std::vector::size_type, const value_type&) [with _Tp = foo, _Alloc = std::allocator<foo>, std::vector::size_type = unsigned int, value_type = foo]'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_vector.h:230:9: instantiated from 'std::vector<_Tp, _Alloc>::vector(std::vector::size_type, const value_type&, const allocator_type&) [with _Tp = foo, _Alloc = std::allocator<foo>, std::vector::size_type = unsigned int, value_type = foo, allocator_type = std::allocator<foo>]'
prog.cpp:13:27: instantiated from here
prog.cpp:7:5: error: 'foo::foo(const foo&)' is private
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_construct.h:80:7: error: within this context