view: proper ctors for single type base view

This commit is contained in:
Michele Caini
2023-12-14 09:42:23 +01:00
parent 9c85cd8d55
commit 5d8a1e3ee1

View File

@@ -615,7 +615,17 @@ public:
* @tparam Type Common type among all storage types.
*/
template<typename Type>
struct basic_storage_view {
class basic_storage_view {
protected:
/*! @cond TURN_OFF_DOXYGEN */
basic_storage_view() noexcept
: leading{} {}
basic_storage_view(const Type *value) noexcept
: leading{value} {}
/*! @endcond */
public:
/*! @brief Common type among all storage types. */
using common_type = Type;
/*! @brief Underlying entity identifier. */
@@ -738,7 +748,7 @@ struct basic_storage_view {
protected:
/*! @cond TURN_OFF_DOXYGEN */
const common_type *leading{};
const common_type *leading;
/*! @endcond */
};
@@ -779,8 +789,7 @@ public:
* @param value The storage for the type to iterate.
*/
basic_view(Get &value) noexcept
: basic_view{} {
storage(value);
: base_type{&value} {
}
/**