-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
There appears to be no matching assert_first_not_base
for aggregates with exactly one member. This is what exists now in detail/fields_count.hpp
:
template <class T, std::size_t I0, std::size_t... I, class /*Enable*/ = typename std::enable_if<!std::is_copy_constructible<T>::value>::type>
constexpr auto assert_first_not_base(std::index_sequence<I0, I...>) noexcept
-> typename std::add_pointer<decltype(T{ ubiq_rref_base_asserting<T>{}, ubiq_rref_constructor{I}... })>::type
{
return nullptr;
}
template <class T>
constexpr void* assert_first_not_base(std::index_sequence<>) noexcept
{
return nullptr;
}
and I wonder if we also need:
template <class T>
constexpr auto assert_first_not_base(std::index_sequence<0UL>) noexcept
-> typename std::add_pointer<decltype(T{ ubiq_rref_base_asserting<T>{}})>::type
{
return nullptr;
}
to cover this case. In my situation, I hacked this in and it seems to work.
Metadata
Metadata
Assignees
Labels
No labels