🎄T
Size: a a a
🎄T
Ee
🎄T
Ee
🎄T
🎄T
cpp_gcc
#include <iostream>
#include <unordered_map>
struct Zalupa;
std::unordered_map<int, Zalupa> map;
struct Zalupa{};
int main() {}
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from 1952694138/source.cpp:1:
/usr/include/c++/7/bits/stl_pair.h: In instantiation of ‘struct std::pair<const int, Zalupa>’:
/usr/include/c++/7/ext/aligned_buffer.h:85:34: required from ‘struct __gnu_cxx::__aligned_buffer<std::pair<const int, Zalupa> >’
/usr/include/c++/7/bits/hashtable_policy.h:248:43: required from ‘struct std::__detail::_Hash_node_value_base<std::pair<const int, Zalupa> >’
/usr/include/c++/7/bits/hashtable_policy.h:294:12: required from ‘struct std::__detail::_Hash_node<std::pair<const int, Zalupa>, false>’
/usr/include/c++/7/bits/hashtable_policy.h:2007:60: required from ‘struct std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<const int, Zalupa>, false> > >’
/usr/include/c++/7/bits/hashtable.h:173:11: required from ‘class std::_Hashtable<int, std::pair<const int, Zalupa>, std::allocator<std::pair<const int, Zalupa> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >’
/usr/include/c++/7/bits/unordered_map.h:104:18: required from ‘class std::unordered_map<int, Zalupa>’
1952694138/source.cpp:4:33: required from here
/usr/include/c++/7/bits/stl_pair.h:215:11: error: ‘std::pair<_T1, _T2>::second’ has incomplete type
_T2 second; /// @c second is a copy of the second object
^~~~~~
1952694138/source.cpp:3:8: note: forward declaration of ‘struct Zalupa’
struct Zalupa;
^~~~~~
К
🎄T
cpp_clang
#include <iostream>
#include <unordered_map>
struct Zalupa;
std::unordered_map<int, Zalupa> map;
struct Zalupa{};
int main() {std::cout<< 10;}
10
К
🎄T
К
T
cpp_clang
#include <iostream>
#include <unordered_map>
struct Zalupa;
std::unordered_map<int, Zalupa> map;
struct Zalupa{};
int main() {std::cout<< 10;}
10
T
🎄T
К
T
T
🎄T