File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1227
1227
\indexlibraryglobal {enable_view}%
1228
1228
\begin {itemdecl }
1229
1229
template<class T>
1230
- inline constexpr bool enable_view = @\libconcept {derived_from}@<T, view_base>;
1230
+ inline constexpr bool @\exposid {is-derived-from-view-interface}@ = @\seebelow@ ; // \expos
1231
+ template<class T>
1232
+ inline constexpr bool enable_view =
1233
+ @\libconcept {derived_from}@<T, view_base> || @\exposid {is-derived-from-view-interface}@<T>;
1231
1234
\end {itemdecl }
1232
1235
1233
1236
\begin {itemdescr }
1237
+ \pnum
1238
+ For a type \tcode {T},
1239
+ \tcode {\exposid {is-derived-from-view-interface}<T>} is \tcode {true}
1240
+ if and only if
1241
+ \tcode {T} has exactly one public base class \tcode {view_interface<U>}
1242
+ for some type \tcode {U} and
1243
+ \tcode {T} has no base classes of type \tcode {view_interface<V>}
1244
+ for any other type \tcode {V}.
1245
+
1234
1246
\pnum
1235
1247
\remarks
1236
1248
Pursuant to \ref {namespace.std }, users may specialize \tcode {enable_view}
1363
1375
namespace std::ranges {
1364
1376
template<class D>
1365
1377
requires is_class_v<D> && @\libconcept {same_as}@<D, remove_cv_t<D>>
1366
- class view_interface : public view_base {
1378
+ class view_interface {
1367
1379
private:
1368
1380
constexpr D& @\exposid {derived}@() noexcept { // \expos
1369
1381
return static_cast<D&>(*this);
You can’t perform that action at this time.
0 commit comments