Stroustrup gave a talk last year about his GSL (Guideline Support Library). There is an implementation by Micosoft at https://github.com/Microsoft/GSL . I was under the impression that the GSL was supposed to advise on bad coding style, and suggest improvements.
To this end, I installed MSFT's GSL and created a C++ file:
#include <stdio.h>
#include <gsl.h>
int main()
{
int *i = new int;
puts("hello world");
}
and built it using the Makefile:
msft : msft.cc
g++ -std=gnu++14 -I ../../src/GSL/include $^ -o $@
.PHONY : clean
clean :
rm -f msft
Obviously, there is a resource leak in the code caused by the new
.
So now I'm confused.
- What is the GSL supposed to actually do?
- Where can I get the source code checker that warns of guideline non-compliance? Stroustrup seemed to imply that it actually exists as a tool, but is that the case?
make
to be posted, but it's not there. – Chancellorsville