瀏覽代碼

doc: brief mention of void storage

Michele Caini 2 年之前
父節點
當前提交
65889cca44
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 1 1
      TODO
  2. 9 0
      docs/md/entity.md

+ 1 - 1
TODO

@@ -6,7 +6,7 @@ EXAMPLES
 * support to polymorphic types (see #859)
 
 DOC:
-* storage<void> and storage<entity>
+* storage<entity>
 * custom storage/view
 * examples (and credits) from @alanjfs :)
 * update entity doc when the storage based model is in place

+ 9 - 0
docs/md/entity.md

@@ -34,6 +34,7 @@
     * [Archives](#archives)
     * [One example to rule them all](#one-example-to-rule-them-all)
 * [Storage](#storage)
+  * [Void storage](#void-storage)
   * [Component traits](#component-traits)
   * [Empty type optimization](#empty-type-optimization)
   * [Pointer stability](#pointer-stability)
@@ -1168,6 +1169,14 @@ entities are not instead.<br/>
 All pools rearranges their items in order to keep the internal arrays tightly
 packed and maximize performance, unless pointer stability is enabled.
 
+## Void storage
+
+A void storage, or `storage<void>`, is a fully functional storage type used to
+create pools not associated with a particular component type.<br/>
+This should be preferred to using a simple sparse set. In particular, a void
+storage offers all those feature normally offered by all other storage types.
+Therefore, it's a perfectly valid pool for use with views or within a registry.
+
 ## Component traits
 
 In `EnTT`, almost everything is customizable. Pools are no exception.<br/>