Browse Source

doc: update to reflect the last changes

skypjack 1 month ago
parent
commit
c5ae1fc8f5
2 changed files with 9 additions and 7 deletions
  1. 7 6
      docs/md/core.md
  2. 2 1
      docs/md/entity.md

+ 7 - 6
docs/md/core.md

@@ -524,12 +524,13 @@ Basically, the whole system relies on a handful of classes. In particular:
   associative containers or for positional accesses in a vector or an array.
   associative containers or for positional accesses in a vector or an array.
   
   
   An external generator can also be used if needed. In fact, `type_index` can be
   An external generator can also be used if needed. In fact, `type_index` can be
-  specialized by type and is also _sfinae-friendly_ in order to allow more
+  specialized by type or constrained with a concept in order to allow more
   refined specializations such as:
   refined specializations such as:
   
   
   ```cpp
   ```cpp
   template<typename Type>
   template<typename Type>
-  struct entt::type_index<Type, std::void_d<decltype(Type::index())>> {
+  requires requires { { Type::index() } -> std::same_as<entt::id_type>; }
+  struct entt::type_index<Type> {
       static entt::id_type value() noexcept {
       static entt::id_type value() noexcept {
           return Type::index();
           return Type::index();
       }
       }
@@ -558,8 +559,8 @@ Basically, the whole system relies on a handful of classes. In particular:
   identifiers remain stable across executions. Moreover, they are generated
   identifiers remain stable across executions. Moreover, they are generated
   at runtime and are no longer a compile-time thing.
   at runtime and are no longer a compile-time thing.
 
 
-  As it happens with `type_index`, also `type_hash` is a _sfinae-friendly_ class
-  that can be specialized in order to customize its behavior globally or on a
+  As it happens with `type_index`, also `type_hash` can be specialized or
+  constrained with a concept in order to customize its behavior globally or on a
   per-type or per-traits basis.
   per-type or per-traits basis.
 
 
 * The name associated with a given type:
 * The name associated with a given type:
@@ -589,8 +590,8 @@ Basically, the whole system relies on a handful of classes. In particular:
   purposes. Users can prevent the library from using these features by means of
   purposes. Users can prevent the library from using these features by means of
   the `ENTT_STANDARD_CPP` definition. In this case, the name is just empty.
   the `ENTT_STANDARD_CPP` definition. In this case, the name is just empty.
 
 
-  As it happens with `type_index`, also `type_name` is a _sfinae-friendly_ class
-  that can be specialized in order to customize its behavior globally or on a
+  As it happens with `type_index`, also `type_name` can be specialized or
+  constrained with a concept in order to customize its behavior globally or on a
   per-type or per-traits basis.
   per-type or per-traits basis.
 
 
 These are then combined into utilities that aim to offer an API that is somewhat
 These are then combined into utilities that aim to offer an API that is somewhat

+ 2 - 1
docs/md/entity.md

@@ -1350,7 +1350,8 @@ struct transform {
 
 
 The `component_traits` class template takes care of _extracting_ the properties
 The `component_traits` class template takes care of _extracting_ the properties
 from the supplied type.<br/>
 from the supplied type.<br/>
-Plus, it is _sfinae-friendly_ and also supports feature-based specializations.
+Plus, it can be specialized and constrained with a concept to further customize
+it on a per type or per feature basis.
 
 
 ## Empty type optimization
 ## Empty type optimization