From c55a99c3d4dc86ba8394ff72375635d538bada3d Mon Sep 17 00:00:00 2001 From: Marius Bancila Date: Tue, 23 Jan 2018 11:23:10 +0200 Subject: [PATCH] separated size and nil --- paper.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/paper.md b/paper.md index 0a837de..2724dd4 100644 --- a/paper.md +++ b/paper.md @@ -70,16 +70,20 @@ uuid::value_type arr[16] = { uuid id(arr); ``` -### Capacity +### Size Member function `size()` indicates the number of bytes in the UUID. Because this is a fixed size structure this function always returns 16. +``` +uuid id; +assert(id.size() == 16); +``` -Member function `nil()` indicates whether the `uuid` has all the bits set to 0. A nil uuid is created by the default constructor or by the string conversion constructors when failing to parse the input argument. +### Nil +A nil UUID is a special UUID that has all the bits set to 0. Its canonical textaul representation is `00000000-0000-0000-0000-000000000000`. Member function `nil()` indicates whether the `uuid` has all the bits set to 0. A nil uuid is created by the default constructor or by the string conversion constructors when failing to parse the input argument. ``` uuid id; assert(id.nil()); -assert(id.size() == 16); ``` ### Iterators