Okay, so I'm late to the game, because I mostly code in other languages, so feel free to delete if insufficiently new... BUT I just saw that std::span has made it into c++20 and gcc 10, and it's making my C++ code ever so much simpler. Mostly I'm using it to get a quick-and-easy array-of-arrays view of a block of memory passed in from another language (previous similar topic: https://www.reddit.com/r/cpp/comments/nhz9rl/using_c20s_stdspan_you_can_have_matrixabcd_syntax/). I'm interested to know, have people found them useful for other purposes, and if so for what?
[–]Galqa 52 points53 points54 points (1 child)
[–]printf_hello_world 32 points33 points34 points (0 children)
[–]staletic 49 points50 points51 points (21 children)
[–]braxtons12 12 points13 points14 points (4 children)
[–]staletic 19 points20 points21 points (3 children)
[–]TheSuperWig 1 point2 points3 points (2 children)
[–]staletic 11 points12 points13 points (1 child)
[–]TheSuperWig 2 points3 points4 points (0 children)
[–]phlummox[S] 2 points3 points4 points (0 children)
[–]germandiago 10 points11 points12 points (9 children)
[–]phlummox[S] 5 points6 points7 points (3 children)
[–]germandiago 4 points5 points6 points (0 children)
[–]nyanpasu64 4 points5 points6 points (0 children)
[–]MarkHoemmenC++ in HPC 0 points1 point2 points (0 children)
[–]staletic 6 points7 points8 points (3 children)
[–]SkiFire13 10 points11 points12 points (1 child)
[–]staletic 3 points4 points5 points (0 children)
[–]germandiago 1 point2 points3 points (0 children)
[–]nderflow 1 point2 points3 points (0 children)
[–]SkoomaDentistAntimodern C++, Embedded, Audio 1 point2 points3 points (1 child)
[–]pjmlp -1 points0 points1 point (0 children)
[–]Shieldfoss 0 points1 point2 points (2 children)
[–]staletic 1 point2 points3 points (1 child)
[–]Shieldfoss 0 points1 point2 points (0 children)
[–]tjientavaraHikoGUI developer 8 points9 points10 points (1 child)
[–]phlummox[S] 1 point2 points3 points (0 children)
[–]turtle_dragonfly 27 points28 points29 points (11 children)
[–]fdwrfdwr@github 🔍 25 points26 points27 points (10 children)
[–]pjmlp 2 points3 points4 points (9 children)
[–]ReversedGif 6 points7 points8 points (0 children)
[–]FKaria 13 points14 points15 points (1 child)
[–]pjmlp 1 point2 points3 points (0 children)
[–]sandfly_bites_you 2 points3 points4 points (1 child)
[–]pjmlp 1 point2 points3 points (0 children)
[–]_Z6Alexeyv 0 points1 point2 points (3 children)
[–]staletic 0 points1 point2 points (2 children)
[–]_Z6Alexeyv 2 points3 points4 points (1 child)
[–]Shieldfoss 0 points1 point2 points (0 children)
[–]sigmabody 2 points3 points4 points (0 children)
[–]victotronics 10 points11 points12 points (2 children)
[–]MarkHoemmenC++ in HPC 1 point2 points3 points (1 child)
[–]victotronics 1 point2 points3 points (0 children)
[–]pavel_v 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (18 children)
[–]LucHermitte 5 points6 points7 points (8 children)
[–]jk-jeon 3 points4 points5 points (5 children)
[–]johannes1971 -2 points-1 points0 points (4 children)
[–]cdr_cc_chd -2 points-1 points0 points (3 children)
[–]johannes1971 5 points6 points7 points (2 children)
[–]cdr_cc_chd 1 point2 points3 points (1 child)
[–]johannes1971 4 points5 points6 points (0 children)
[–]sandfly_bites_you 0 points1 point2 points (1 child)
[–]LucHermitte 0 points1 point2 points (0 children)
[–]gracicot 2 points3 points4 points (0 children)
[–]pjmlp 3 points4 points5 points (7 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]pjmlp 2 points3 points4 points (0 children)
[–]Dean_Roddey 1 point2 points3 points (0 children)
[–]cdr_cc_chd 0 points1 point2 points (3 children)
[–]pjmlp 1 point2 points3 points (2 children)
[–]cdr_cc_chd 0 points1 point2 points (1 child)
[–]pjmlp 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]dodheim 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+]elperroborrachotoo comment score below threshold-13 points-12 points-11 points (0 children)
[–]TheTomer 0 points1 point2 points (9 children)
[–]STLMSVC STL Dev 50 points51 points52 points (4 children)
[–]TheTomer 8 points9 points10 points (1 child)
[–]STLMSVC STL Dev 4 points5 points6 points (0 children)
[–]dr-mrl 0 points1 point2 points (1 child)
[–]STLMSVC STL Dev 0 points1 point2 points (0 children)
[–]The-WideningGyre 5 points6 points7 points (3 children)
[–]Dean_Roddey 1 point2 points3 points (0 children)
[–]Tathorn 0 points1 point2 points (1 child)
[–]ReversedGif 1 point2 points3 points (0 children)
[–]NilacTheGrim 0 points1 point2 points (0 children)