fork download
  1. #include <set>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. std::set<int&> x;
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h: In instantiation of ‘__gnu_cxx::new_allocator<int&>’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/allocator.h:84:   instantiated from ‘std::allocator<int&>’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_set.h:95:   instantiated from ‘std::set<int&, std::less<int&>, std::allocator<int&> >’
prog.cpp:6:   instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:59: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:60: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:79: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:82: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:87: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:97: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:107: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/ext/new_allocator.h:118: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/allocator.h: In instantiation of ‘std::allocator<int&>’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_set.h:95:   instantiated from ‘std::set<int&, std::less<int&>, std::allocator<int&> >’
prog.cpp:6:   instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/allocator.h:88: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/allocator.h:89: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h: In instantiation of ‘std::_Rb_tree<int&, int&, std::_Identity<int&>, std::less<int&>, std::allocator<int&> >’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_set.h:117:   instantiated from ‘std::set<int&, std::less<int&>, std::allocator<int&> >’
prog.cpp:6:   instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h:332: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h:333: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h: In instantiation of ‘std::_Rb_tree<int&, int&, std::_Identity<int&>, std::less<int&>, std::allocator<int&> >’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_set.h:117:   instantiated from ‘std::set<int&, std::less<int&>, std::allocator<int&> >’
prog.cpp:6:   instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h:1379: error: forming pointer to reference type ‘int&’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h: In member function ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_destroy_node(std::_Rb_tree_node<_Val>*) [with _Key = int&, _Val = int&, _KeyOfValue = std::_Identity<int&>, _Compare = std::less<int&>, _Alloc = std::allocator<int&>]’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h:943:   instantiated from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase(std::_Rb_tree_node<_Val>*) [with _Key = int&, _Val = int&, _KeyOfValue = std::_Identity<int&>, _Compare = std::less<int&>, _Alloc = std::allocator<int&>]’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h:585:   instantiated from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = int&, _Val = int&, _KeyOfValue = std::_Identity<int&>, _Compare = std::less<int&>, _Alloc = std::allocator<int&>]’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_set.h:93:   instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_tree.h:390: error: ‘class std::allocator<int&>’ has no member named ‘destroy’
stdout
Standard output is empty