Submission #64634
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:70:14: error: ‘std::tuple<int, int, int> <structured bindings>’ has incomplete type
for(auto [y, x, p] : point){
^~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:69,
from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/vector.tcc: In instantiation of ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int, int&}; _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::vector<_Tp, _Alloc>::reference = std::tuple<int, int, int>&]’:
./Main.cpp:63:39: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/vector.tcc:105:6: error: cannot increment a pointer to incomplete type ‘std::tuple<int, int, int>’
++this->_M_impl._M_finish;
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h: In instantiation of ‘__gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++() [with _Iterator = std::tuple<int, int, int>*; _Container = std::vector<std::tuple<int, int, int> >]’:
./Main.cpp:70:26: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:803:2: error: cannot increment a pointer to incomplete type ‘std::tuple<int, int, int>’
++_M_current;
^~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:64,
from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:395:15: required from ‘std::vector<_Tp, _Alloc>::vector() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]’
./Main.cpp:58:35: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:286:35: error: invalid use of incomplete type ‘class std::tuple<int, int, int>’
_M_impl._M_end_of_storage - _M_impl._M_start);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘class std::tuple<int, int, int>’
class tuple;
^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h: In substitution of ‘template<class _IteratorL, class _IteratorR, class _Container> decltype ((__lhs.base() - __rhs.base())) __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&) [with _IteratorL = std::tuple<int, int, int>*; _IteratorR = std::tuple<int, int, int>*; _Container = std::vector<std::tuple<int, int, int> >]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:1969:22: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::tuple<int, int, int>*, std::vector<std::tuple<int, int, int> > >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:4834:18: required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<std::tuple<int, int, int>*, std::vector<std::tuple<int, int, int> > >]’
./Main.cpp:66:36: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:953:30: error: invalid use of incomplete type ‘class std::tuple<int, int, int>’
-> decltype(__lhs.base() - __rhs.base())
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘class std::tuple<int, int, int>’
class tuple;
^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:62,
from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h: In instantiation of ‘void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::tuple<int, int, int>*]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:206:15: required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = std::tuple<int, int, int>*; _Tp = std::tuple<int, int, int>]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:567:15: required from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]’
./Main.cpp:58:35: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:133:21: error: static assertion failed: value type is destructible
static_assert(is_destructible<_Value_type>::value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:137:11: error: invalid use of incomplete type ‘std::iterator_traits<std::tuple<int, int, int>*>::value_type’ {aka ‘class std::tuple<int, int, int>’}
std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__destroy(__first, __last);
~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘std::iterator_traits<std::tuple<int, int, int>*>::value_type’ {aka ‘class std::tuple<int, int, int>’}
class tuple;
^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:46,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::tuple<int, int, int>; _Args = {int, int, int&}; _Tp = std::tuple<int, int, int>]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::tuple<int, int, int>; _Args = {int, int, int&}; _Tp = std::tuple<int, int, int>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::tuple<int, int, int> >]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/vector.tcc:103:30: required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int, int&}; _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::vector<_Tp, _Alloc>::reference = std::tuple<int, int, int>&]’
./Main.cpp:63:39: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:136:4: error: invalid use of incomplete type ‘class std::tuple<int, int, int>’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘class std::tuple<int, int, int>’
class tuple;
^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:46,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::deallocate(__gnu_cxx::new_allocator<_Tp>::pointer, __gnu_cxx::new_allocator<_Tp>::size_type) [with _Tp = std::tuple<int, int, int>; __gnu_cxx::new_allocator<_Tp>::pointer = std::tuple<int, int, int>*; __gnu_cxx::new_allocator<_Tp>::size_type = long unsigned int]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/alloc_traits.h:462:9: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::deallocate(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, std::allocator_traits<std::allocator<_CharT> >::pointer, std::allocator_traits<std::allocator<_CharT> >::size_type) [with _Tp = std::tuple<int, int, int>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::tuple<int, int, int> >; std::allocator_traits<std::allocator<_CharT> >::pointer = std::tuple<int, int, int>*; std::allocator_traits<std::allocator<_CharT> >::size_type = long unsigned int]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:304:19: required from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(std::_Vector_base<_Tp, _Alloc>::pointer, std::size_t) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::_Vector_base<_Tp, _Alloc>::pointer = std::tuple<int, int, int>*; std::size_t = long unsigned int]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:285:2: required from ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:395:15: required from ‘std::vector<_Tp, _Alloc>::vector() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]’
./Main.cpp:58:35: required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:119:6: error: invalid application of ‘__alignof__’ to incomplete type ‘std::tuple<int, int, int>’
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
^~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:121:46: error: invalid application of ‘__alignof__’ to incomplete type ‘std::tuple<int, int, int>’
::operator delete(__p, std::align_val_t(alignof(_Tp)));
^~~~~~~~~~~~
セット
テストケース