From c3017097aee5e639ea07019211c1252ddd31a689 Mon Sep 17 00:00:00 2001 From: mariusbancila Date: Mon, 18 Dec 2017 23:35:19 +0200 Subject: [PATCH] braces in array init --- paper.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paper.md b/paper.md index b4f45bb..7824468 100644 --- a/paper.md +++ b/paper.md @@ -49,12 +49,12 @@ uuid id2(str); The conversion constructor from `std::array` enables the construction of a `uuid` from an array of bytes. ``` -std::array arr{ +std::array arr{{ 0x47, 0x18, 0x38, 0x23, 0x25, 0x74, 0x4b, 0xfd, 0xb4, 0x11, - 0x99, 0xed, 0x17, 0x7d, 0x3e, 0x43}; + 0x99, 0xed, 0x17, 0x7d, 0x3e, 0x43}}; uuid id(arr); ``` @@ -96,12 +96,12 @@ assert(id.wstring() == L"47183823-2574-4bfd-b411-99ed177d3e43"); Constant and mutable iterators allow direct access to the underlaying `uuid` data. This enables both direct reading and writing of the `uuid` bits. ``` -std::array arr{ +std::array arr{{ 0x47, 0x18, 0x38, 0x23, 0x25, 0x74, 0x4b, 0xfd, 0xb4, 0x11, - 0x99, 0xed, 0x17, 0x7d, 0x3e, 0x43}; + 0x99, 0xed, 0x17, 0x7d, 0x3e, 0x43}}; uuid id; assert(id.nil());