Skip to content

Commit c5ae1fc

Browse files
committed
doc: update to reflect the last changes
1 parent 39806a5 commit c5ae1fc

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

docs/md/core.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,13 @@ Basically, the whole system relies on a handful of classes. In particular:
524524
associative containers or for positional accesses in a vector or an array.
525525

526526
An external generator can also be used if needed. In fact, `type_index` can be
527-
specialized by type and is also _sfinae-friendly_ in order to allow more
527+
specialized by type or constrained with a concept in order to allow more
528528
refined specializations such as:
529529

530530
```cpp
531531
template<typename Type>
532-
struct entt::type_index<Type, std::void_d<decltype(Type::index())>> {
532+
requires requires { { Type::index() } -> std::same_as<entt::id_type>; }
533+
struct entt::type_index<Type> {
533534
static entt::id_type value() noexcept {
534535
return Type::index();
535536
}
@@ -558,8 +559,8 @@ Basically, the whole system relies on a handful of classes. In particular:
558559
identifiers remain stable across executions. Moreover, they are generated
559560
at runtime and are no longer a compile-time thing.
560561

561-
As it happens with `type_index`, also `type_hash` is a _sfinae-friendly_ class
562-
that can be specialized in order to customize its behavior globally or on a
562+
As it happens with `type_index`, also `type_hash` can be specialized or
563+
constrained with a concept in order to customize its behavior globally or on a
563564
per-type or per-traits basis.
564565

565566
* The name associated with a given type:
@@ -589,8 +590,8 @@ Basically, the whole system relies on a handful of classes. In particular:
589590
purposes. Users can prevent the library from using these features by means of
590591
the `ENTT_STANDARD_CPP` definition. In this case, the name is just empty.
591592
592-
As it happens with `type_index`, also `type_name` is a _sfinae-friendly_ class
593-
that can be specialized in order to customize its behavior globally or on a
593+
As it happens with `type_index`, also `type_name` can be specialized or
594+
constrained with a concept in order to customize its behavior globally or on a
594595
per-type or per-traits basis.
595596
596597
These are then combined into utilities that aim to offer an API that is somewhat

docs/md/entity.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,8 @@ struct transform {
13501350
13511351
The `component_traits` class template takes care of _extracting_ the properties
13521352
from the supplied type.<br/>
1353-
Plus, it is _sfinae-friendly_ and also supports feature-based specializations.
1353+
Plus, it can be specialized and constrained with a concept to further customize
1354+
it on a per type or per feature basis.
13541355
13551356
## Empty type optimization
13561357

0 commit comments

Comments
 (0)