@@ -644,13 +644,12 @@ class basic_view<get_t<Get...>, exclude_t<Exclude...>, std::enable_if_t<(sizeof.
644644
645645 /* *
646646 * @brief Combines a view and a storage in _more specific_ view.
647- * @tparam OGet Type of storage to join the view with.
648- * @param other The storage for the type to join the view with.
647+ * @tparam OGet Type of storage to combine the view with.
648+ * @param other The storage for the type to combine the view with.
649649 * @return A more specific view.
650650 */
651651 template <typename OGet>
652- [[nodiscard]] auto join (OGet &other) const noexcept {
653- static_assert (std::is_base_of_v<common_type, OGet>, " Unexpected storage type" );
652+ [[nodiscard]] std::enable_if_t <std::is_base_of_v<common_type, OGet>, basic_view<get_t <Get..., OGet>, exclude_t <Exclude...>>> operator |(OGet &other) const noexcept {
654653 return *this | basic_view<get_t <OGet>, exclude_t <>>{other};
655654 }
656655
@@ -1086,13 +1085,12 @@ class basic_view<get_t<Get>, exclude_t<>>
10861085
10871086 /* *
10881087 * @brief Combines a view and a storage in _more specific_ view.
1089- * @tparam OGet Type of storage to join the view with.
1090- * @param other The storage for the type to join the view with.
1088+ * @tparam OGet Type of storage to combine the view with.
1089+ * @param other The storage for the type to combine the view with.
10911090 * @return A more specific view.
10921091 */
10931092 template <typename OGet>
1094- [[nodiscard]] auto join (OGet &other) const noexcept {
1095- static_assert (std::is_base_of_v<common_type, OGet>, " Unexpected storage type" );
1093+ [[nodiscard]] std::enable_if_t <std::is_base_of_v<common_type, OGet>, basic_view<get_t <Get, OGet>, exclude_t <>>> operator |(OGet &other) const noexcept {
10961094 return *this | basic_view<get_t <OGet>, exclude_t <>>{other};
10971095 }
10981096
0 commit comments