fork download
  1.  
  2. #include <unordered_map>
  3. #include <memory>
  4. #include <boost/unordered_map.hpp>
  5.  
  6.  
  7. class NotCopyable
  8. {
  9. public:
  10. NotCopyable(){}
  11.  
  12. NotCopyable(NotCopyable&& other) {}
  13.  
  14. private:
  15. NotCopyable(const NotCopyable& other) {}
  16. };
  17.  
  18. int main()
  19. {
  20. boost::unordered_map<std::string,boost::signal<void()> > f;
  21. f.find("blah");
  22. //f["blah"];
  23. f["foo"]();
  24. //f.emplace("good", std::unique_ptr<boost::signal<void()> > ( new boost::signal<void()>()));
  25. //f.emplace();
  26. //f.erase("foo");
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/unordered_map:40,
                 from prog.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/c++0x_warning.h:36:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/unordered_map:48,
                 from prog.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/type_traits:82: error: template argument 1 is invalid
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/type_traits:106: error: template argument 1 is invalid
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/type_traits:136: error: expected unqualified-id before ‘&&’ token
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/hashtable.h:55,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/unordered_map:54,
                 from prog.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:223: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:223: error: invalid constructor; you probably meant ‘std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys> (const std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>&)’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:232: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:660: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:660: error: prototype for ‘std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::_Hashtable(std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>)’ does not match any in class ‘std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:619: error: candidates are: std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::_Hashtable(const std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>&)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:218: error:                 template<class _Key, class _Value, class _Allocator, class _ExtractKey, class _Equal, class _H1, class _H2, class _Hash, class _RehashPolicy, bool __cache_hash_code, bool __constant_iterators, bool __unique_keys> template<class _InputIterator> std::_Hashtable::_Hashtable(_InputIterator, _InputIterator, typename _Allocator::size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const _Allocator&)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:557: error:                 std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::_Hashtable(typename _Allocator::size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const _Allocator&)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:714: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable: In member function ‘void std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::swap(std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/hashtable:723: error: ‘__x’ was not declared in this scope
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/unordered_map:69,
                 from prog.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:90: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:90: error: invalid constructor; you probably meant ‘std::__unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc, __cache_hash_code> (const std::__unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc, __cache_hash_code>&)’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:147: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:147: error: invalid constructor; you probably meant ‘std::__unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc, __cache_hash_code> (const std::__unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc, __cache_hash_code>&)’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:205: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:205: error: invalid constructor; you probably meant ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> (const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&)’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:209: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: In member function ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:213: error: ‘__x’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:254: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:254: error: invalid constructor; you probably meant ‘std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> (const std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&)’
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:258: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: In member function ‘std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:262: error: ‘__x’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:283: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: In function ‘void std::swap(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:285: error: ‘__x’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:285: error: ‘__y’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:290: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: In function ‘void std::swap(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:291: error: ‘__y’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:295: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: In function ‘void std::swap(std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:297: error: ‘__x’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:297: error: ‘__y’ was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:302: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map: In function ‘void std::swap(std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&, std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>)’:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/tr1_impl/unordered_map:303: error: ‘__y’ was not declared in this scope
prog.cpp: At global scope:
prog.cpp:12: error: expected ‘,’ or ‘...’ before ‘&&’ token
prog.cpp:12: error: invalid constructor; you probably meant ‘NotCopyable (const NotCopyable&)’
prog.cpp: In function ‘int main()’:
prog.cpp:20: error: ‘signal’ is not a member of ‘boost’
prog.cpp:20: error: ‘signal’ is not a member of ‘boost’
prog.cpp:20: error: a call to a constructor cannot appear in a constant-expression
prog.cpp:20: error: template argument 2 is invalid
prog.cpp:20: error: template argument 5 is invalid
prog.cpp:20: error: expected unqualified-id before ‘>’ token
prog.cpp:21: error: ‘f’ was not declared in this scope
stdout
Standard output is empty