Hacker GitHub

← All repos

microsoft/GSL

View on GitHub ↗ ★ 6,733 C++

Guidelines Support Library

27 mentions on Hacker News by 22 people: 1 story, 26 comments · first 2015-11-14 · latest 2026-08-03

Mentions per year 27 mentions · busiest year 2017 (7)
20082026
  1. …for GSL I'm a bit more skeptical that such support would extend to XCode, GCC, and Clang. [0]: https://github.com/microsoft/GSL/tree/99a29ce797c8337b8923f2...
  2. …that they're going to look into fixing the UB. Sutter may have just been stating an assumption. https://github.com/microsoft/GSL/issues/786#issuecomment-513... > I'll raise this issue in the next internal GSL sync. I'd agree with y'all…
  3. The C++ core guideline support library has it. https://github.com/microsoft/GSL/blob/main/docs/headers.md#u... What do you mean by move-out unique_ptr? That the not_null ptr type would ne null after it's been moved? In that case that's…
  4. …Guidelines Support Library, GSL). Which seems to be this (at least Microsoft's implementation): https://github.com/microsoft/GSL And I'm left wondering, is this just how C++ is? Can't the language provide tooling for me to better adhere to…
    comment by modernerd · 2025-02-05 · in 21st Century C++
  5. …somehow so we don't end up with multiple syntaxes in C++? https://reviews.llvm.org/D64448 https://github.com/microsoft/GSL/blob/main/docs/headers.md#g...
    comment by dataflow · 2024-02-20 · in Cake – C23 and Beyond (2023)
  6. …it introduces a similar disruption like you might find from a brand new programming language. [1] https://github.com/microsoft/GSL
    comment by wyldfire · 2023-02-14 · in C++23 “Pandemic Edition” is complete
  7. …be a gentler way to get some of the benefits of Rust. But it comes with a similarly higher bar. [1] https://github.com/microsoft/GSL
    comment by wyldfire · 2022-12-03 · in Using Rust at a startup: A cautionary tale
  8. That's correct. Also see https://github.com/microsoft/GSL , which is a header-only C++ library that implements the Guidelines Support Library as specified by ISO C++. It's extremely useful (especially to get std::span<T> if you don't have…
    comment by qalmakka · 2021-06-26 · in Goodbye C++, Hello C
  9. …https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines GSL (Core Guidelines Support Library): https://github.com/Microsoft/GSL
    comment by dgellow · 2021-04-03 · in The Sad Truth About C++ Copy Elision
  10. …comes with the class "final_action" and the function "finally()". Check the implementation here: https://github.com/microsoft/GSL/blob/master/include/gsl/gsl... . Example from https://docs.microsoft.com/en-us/cpp/code-quality/c26448?vie...…
    comment by dgellow · 2020-10-01 · in Defer Reference Implementation for C
  11. C++ has it though, https://github.com/microsoft/GSL/blob/master/include/gsl/spa...
    comment by pjmlp · 2020-09-29 · in Zig's New Relationship with LLVM
  12. There's also the guideline support library (GSL) -- is anyone using it? https://github.com/Microsoft/GSL Stroustrup talk from 2016: https://www.youtube.com/watch?v=JtMPGwA3MzQ
  13. …final_action<F>(std::forward<F>(f)); } Usage: auto deferred = finally([&]{ /* deferred stuff */ }); https://github.com/microsoft/GSL/blob/master/include/gsl/gsl...
    comment by usefulcat · 2020-03-19 · in A Defer Statement for C
  14. …= delete; ~final_act() noexcept { if (invoke_) f_(); } private: F f_; bool invoke_; }; Source: https://github.com/microsoft/GSL/blob/ebe7ebfd855a95eb937831...
    comment by dgellow · 2019-12-20 · in Show HN: A simple garbage collector for C
  15. …ocpp/CppCoreGuidelines/blob/master/CppC... The only implementation so far seems to be from Microsoft: https://github.com/Microsoft/GSL/blob/master/include/gsl/gsl...
    comment by nuxi · 2018-03-09 · in C++ Core Guidelines
  16. …remain interested in C++. [1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus [2] https://github.com/Microsoft/GSL/blob/1c95f9436eae69c9b93159... [3] https://github.com/duneroadrunner/SaferCPlusPlus/blob/278b40...
  17. That's what the GSL was supposed to be https://github.com/Microsoft/GSL It seemed really cool. All compile time checks. I have no idea why it didn't take off
  18. https://github.com/Microsoft/GSL is an attempt at something like this. The Core Guidelines have been in development for a long time now; and they do only catch a subset of issues. I'm all in favor of making languages safer overall though!
    comment by steveklabnik · 2017-09-12 · in Curl’s backdoor threat
  19. not_null style classes might be what you're after, e.g. https://github.com/Microsoft/GSL/blob/master/include/gsl/gsl... . Whan trying to store nullptr in it at runtime that will result in an exception or abort or whatever it's implemented…
  20. …here had a chance to try it out? https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC... https://github.com/Microsoft/GSL https://msdn.microsoft.com/en-us/library/mt762841.aspx https://blogs.msdn.microsoft.com/vcblog/2016/10/12/cppc…
  21. …support of the the CPP Core Guidelines). [0] https://github.com/isocpp/CppCoreGuidelines [1] https://github.com/microsoft/gsl/
  22. …for the last couple of years. https://blogs.msdn.microsoft.com/vcblog/2015/12/03/c-core-gu... https://github.com/Microsoft/GSL https://www.youtube.com/watch?v=JfmTagWcqoE
    comment by youdontknowtho · 2017-01-03 · in Rust is Software's Salvation
  23. …"C++ Core Guidelines", and "GSL". https://isocpp.org/blog/2015/09/bjarne-stroustrup-announces-... https://github.com/Microsoft/GSL I watched his talk -- wondering if anyone is using it. https://www.youtube.com/watch?v=1OEu9C51K2A Using GSL…
    comment by Tempest1981 · 2016-12-28 · in Rust vs C Pitfalls
  24. …know what happened with this initiative? [1] https://www.youtube.com/watch?v=1OEu9C51K2A [2] https://github.com/Microsoft/GSL
    comment by MichaelMoser123 · 2016-10-09 · in Type-Safe Unions in C++ and Rust
  25. here is the tool https://github.com/Microsoft/GSL Introduced in this year's cppcon https://channel9.msdn.com/Events/CPP/CppCon-2015/Writing-Goo...
    comment by something123 · 2015-11-14 · in Breaking all the Eggs in C++
  26. …just a nice literary exercise The static checker is found here (obviously still under development) https://github.com/Microsoft/GSL
    comment by something123 · 2015-11-14 · in Breaking all the Eggs in C++