https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105386

            Bug ID: 105386
           Summary: Tuple in unevaluated context is instantiated; creates
                    reference to void
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cuzdav at gmail dot com
  Target Milestone: ---

Created attachment 52878
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52878&action=edit
preprocessed code

Starting with g++11.2 some of meta-programming code started to fail.
While instantiating a tuple in an unevaluated context, it now complains that
the tuple contains a void member and it's creating a reference to void, yet it
is the same type as in the working case, just computed differently.


Output of g++ -v
(base) bash-4.2$ /opt/imc/gcc-11.2.0/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/opt/imc/gcc-11.2.0/bin/g++
COLLECT_LTO_WRAPPER=/opt/imc/gcc-11.2.0/libexec/gcc/x86_64-pc-linux-gnu/11.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-11.2.0/configure --prefix=/opt/imc/gcc-11.2.0
--enable-languages=c,c++,fortran,lto --disable-multilib
--with-build-time-tools=/opt/buildagent/work/d7a993299378ca7e/11.2.0/INSTALLDIR//opt/imc/gcc-11.2.0/bin
--enable-libstdcxx-time=rt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC) 



Code appears in its entirety in attachment, but here is the main focus of the
error:

class Chunk { };
using ChunkMetaData = std::tuple<void, Chunk, void>;

template <typename MessageT> ChunkMetaData chunkMetaData(MessageT&&);


template <typename MessageChunkT>
class ChunkSeq
{
public:

  ////////////////////////////////////////
  using good_type = ChunkMetaData;


#ifdef SHOWBUG
  using bad_type = decltype(chunkMetaData(std::declval<MessageChunkT>()));
  static_assert(std::is_same_v<good_type, bad_type>);
  using MetaData = bad_type;
#else
  using MetaData = good_type;
#endif

  ////////////////////////////////////////


In gcc10, when SHOWBUG is defined, it still builds.  The static assertion
passes.  With gcc11 and 12, it fails, upset about a tuple creating a reference
to void.


Live example:
https://godbolt.org/z/4Wq3s936W


Errors:
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘struct std::_Head_base<2, void, false>’:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:407:12:
  required from ‘struct std::_Tuple_impl<2, void>’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:244:12:
  required from ‘struct std::_Tuple_impl<0, void, Chunk, void>’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:599:11:
  required from ‘class std::tuple<void, Chunk, void>’
krx/feed/sr10/foo.cpp:171:42:   [ skipping 2 instantiation contexts, use
-ftemplate-backtrace-limit=0 to disable ]
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:182:17:
error: forming reference to void
  182 |       constexpr _Head_base(const _Head& __h)
      |                 ^~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:219:7:
error: forming reference to void
  219 |       _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; }
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:222:7:
error: forming reference to void
  222 |       _M_head(const _Head_base& __b) noexcept { return
__b._M_head_impl; }
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:224:13:
error: ‘std::_Head_base<_Idx, _Head, false>::_M_head_impl’ has incomplete type
  224 |       _Head _M_head_impl;
      |             ^~~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:224:13:
error: invalid use of ‘void’
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘struct std::_Tuple_impl<2, void>’:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:244:12:
  recursively required from ‘struct std::_Tuple_impl<1, Chunk, void>’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:244:12:
  required from ‘struct std::_Tuple_impl<0, void, Chunk, void>’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:599:11:
  required from ‘class std::tuple<void, Chunk, void>’
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:415:7:
error: forming reference to void
  415 |       _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t);
}
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:418:7:
error: forming reference to void
  418 |       _M_head(const _Tuple_impl& __t) noexcept { return
_Base::_M_head(__t); }
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:425:7:
error: forming reference to void
  425 |       _Tuple_impl(const _Head& __head)
      |       ^~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:466:9:
error: forming reference to void
  466 |         _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘struct std::_Tuple_impl<1, Chunk, void>’:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:244:12:
  required from ‘struct std::_Tuple_impl<0, void, Chunk, void>’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:599:11:
  required from ‘class std::tuple<void, Chunk, void>’
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:269:7:
error: forming reference to void
  269 |       _Tuple_impl(const _Head& __head, const _Tail&... __tail)
      |       ^~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:319:9:
error: forming reference to void
  319 |         _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~~~~~~~
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘struct std::_Head_base<0, void, false>’:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:244:12:
  required from ‘struct std::_Tuple_impl<0, void, Chunk, void>’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:599:11:
  required from ‘class std::tuple<void, Chunk, void>’
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:182:17:
error: forming reference to void
  182 |       constexpr _Head_base(const _Head& __h)
      |                 ^~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:219:7:
error: forming reference to void
  219 |       _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; }
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:222:7:
error: forming reference to void
  222 |       _M_head(const _Head_base& __b) noexcept { return
__b._M_head_impl; }
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:224:13:
error: ‘std::_Head_base<_Idx, _Head, false>::_M_head_impl’ has incomplete type
  224 |       _Head _M_head_impl;
      |             ^~~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:224:13:
error: invalid use of ‘void’
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘struct std::_Tuple_impl<0, void, Chunk, void>’:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:599:11:
  required from ‘class std::tuple<void, Chunk, void>’
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:254:7:
error: forming reference to void
  254 |       _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t);
}
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:257:7:
error: forming reference to void
  257 |       _M_head(const _Tuple_impl& __t) noexcept { return
_Base::_M_head(__t); }
      |       ^~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:269:7:
error: forming reference to void
  269 |       _Tuple_impl(const _Head& __head, const _Tail&... __tail)
      |       ^~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:319:9:
error: forming reference to void
  319 |         _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
      |         ^~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘class std::tuple<void, Chunk, void>’:
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:621:72:
error: forming reference to void
  621 |           _TCC<_Cond>::template
__is_implicitly_constructible<_Args...>(),
      |          
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:627:72:
error: forming reference to void
  627 |           _TCC<_Cond>::template
__is_explicitly_constructible<_Args...>(),
      |          
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:621:72:
error: forming reference to void
  621 |           _TCC<_Cond>::template
__is_implicitly_constructible<_Args...>(),
      |          
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:627:72:
error: forming reference to void
  627 |           _TCC<_Cond>::template
__is_explicitly_constructible<_Args...>(),
      |          
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:888:71:
error: forming reference to void
  888 |       operator=(typename conditional<__assignable<const
_Elements&...>(),
      |                                     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:888:71:
error: no matching function for call to ‘std::tuple<void, Chunk,
void>::<expression error>()’
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:633:9:
note: candidate: ‘template<class ... _UElements> static constexpr
std::__enable_if_t<(sizeof... (_UElements) == sizeof... (_Elements)), bool>
std::tuple<_Elements>::__assignable() [with _UElements = {_UElements ...};
_Elements = {void, Chunk, void}]’
  633 |         __assignable()
      |         ^~~~~~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:633:9:
note:   template argument deduction/substitution failed:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘static constexpr std::__enable_if_t<(sizeof...
(_UElements) == sizeof... (_Elements)), bool>
std::tuple<_Elements>::__assignable() [with _UElements = {void, Chunk, void};
_Elements = {void, Chunk, void}; std::__enable_if_t<(sizeof... (_UElements) ==
sizeof... (_Elements)), bool> = bool]’:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:899:64:
  required from ‘class std::tuple<void, Chunk, void>’
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:634:68:
error: forming reference to void
  634 |         { return __and_<is_assignable<_Elements&,
_UElements>...>::value; }
      |                                                                   
^~~~~
In file included from krx/feed/sr10/foo.cpp:1:
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:
In instantiation of ‘class std::tuple<void, Chunk, void>’:
krx/feed/sr10/foo.cpp:171:42:   required from ‘class ChunkSeq<Chunk>’
krx/feed/sr10/foo.cpp:231:35:   required from ‘constexpr const bool
FieldIsPartialBegin<Chunk>::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<FieldIsPartialBegin<Chunk> >::value<PartialField<0> >’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<FieldIsPartialBegin<Chunk> >,
std::tuple<PartialField<0>, PartialField<1> > >’
krx/feed/sr10/foo.cpp:235:7:   required by substitution of ‘template<class T>
using PartialStartField = typename KeepIf<FieldIsPartialBegin<T>, typename
RemoveIfImpl<InvertPredicate<ChunkHasPartialType<T> >,
std::tuple<PartialField<0>, PartialField<1> > >::type>::type [with T = Chunk]’
krx/feed/sr10/foo.cpp:240:47:   required from ‘constexpr const bool
HasPartialBegin::value<Chunk>’
krx/feed/sr10/foo.cpp:111:57:   required from ‘constexpr const bool
InvertPredicate<HasPartialBegin>::value<Chunk>’
krx/feed/sr10/foo.cpp:122:11:   required from ‘struct
RemoveIfImpl<InvertPredicate<HasPartialBegin>, std::tuple<Chunk> >’
krx/feed/sr10/foo.cpp:247:6:   required from here
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:899:64:
  in ‘constexpr’ expansion of ‘std::tuple<void, Chunk,
void>::__assignable<void, Chunk, void>()’
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:899:7:
error: ‘constexpr’ call flows off the end of the function
  899 |       operator=(typename conditional<__assignable<_Elements...>(),
      |       ^~~~~~~~
/opt/imc/gcc-11.2.0/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/tuple:899:64:
note: in template argument for type ‘bool’
  899 |       operator=(typename conditional<__assignable<_Elements...>(),
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Reply via email to