#include <iostream>
#include <tuple>
#include <typeinfo>
template<typename T>
void f()
{
std::cout << typeid(T).name() << std::endl;
}
int main()
{
f<std::tuple<void>>();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHVwbGU+CiNpbmNsdWRlIDx0eXBlaW5mbz4KCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CnZvaWQgZigpCnsKCXN0ZDo6Y291dCA8PCB0eXBlaWQoVCkubmFtZSgpIDw8IHN0ZDo6ZW5kbDsKfQoKaW50IG1haW4oKQp7CglmPHN0ZDo6dHVwbGU8dm9pZD4+KCk7Cn0K
In file included from prog.cpp:2:0:
/usr/include/c++/5/tuple: In instantiation of 'struct std::_Head_base<0u, void, false>':
/usr/include/c++/5/tuple:339:12: required from 'struct std::_Tuple_impl<0u, void>'
/usr/include/c++/5/tuple:463:11: required from 'class std::tuple<void>'
prog.cpp:8:29: required from 'void f() [with T = std::tuple<void>]'
prog.cpp:13:22: required from here
/usr/include/c++/5/tuple:107:17: error: forming reference to void
constexpr _Head_base(const _Head& __h)
^
/usr/include/c++/5/tuple:142:7: error: forming reference to void
_M_head(_Head_base& __b) noexcept { return __b._M_head_impl; }
^
/usr/include/c++/5/tuple:145:7: error: forming reference to void
_M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; }
^
/usr/include/c++/5/tuple:147:13: error: 'std::_Head_base<_Idx, _Head, false>::_M_head_impl' has incomplete type
_Head _M_head_impl;
^
/usr/include/c++/5/tuple:147:13: error: invalid use of 'void'
/usr/include/c++/5/tuple: In instantiation of 'struct std::_Tuple_impl<0u, void>':
/usr/include/c++/5/tuple:463:11: required from 'class std::tuple<void>'
prog.cpp:8:29: required from 'void f() [with T = std::tuple<void>]'
prog.cpp:13:22: required from here
/usr/include/c++/5/tuple:347:7: error: forming reference to void
_M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); }
^
/usr/include/c++/5/tuple:350:7: error: forming reference to void
_M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); }
^
/usr/include/c++/5/tuple:356:17: error: forming reference to void
constexpr _Tuple_impl(const _Head& __head)
^
/usr/include/c++/5/tuple:385:2: error: forming reference to void
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
^
/usr/include/c++/5/tuple: In instantiation of 'class std::tuple<void>':
prog.cpp:8:29: required from 'void f() [with T = std::tuple<void>]'
prog.cpp:13:22: required from here
/usr/include/c++/5/tuple:472:17: error: forming reference to void
constexpr tuple(const _Elements&... __elements)
^
/usr/include/c++/5/tuple:506:2: error: forming reference to void
tuple(allocator_arg_t __tag, const _Alloc& __a,
^