Microsoft's (Core) Guidelines Support Library implementation is said to support GCC 5.1 - but does not specify support for other versions. Higher versions seem to be ok (anyway, 5.3.1 on my Debian Stretch) - but building the tests with GCC 4.9.3 fails.
- Has anybody else implemented the GSL?
- Can I use MS GSL anyway, somehow?
- If not, can I use some safe subset of it? (Probably not, I know)
- If not, isn't it a problem that only people with newer compilers can have a guidelines support libraries? Even though their older compilers support C++11 or even C++14?
Yes, there is one I know of: gsl-lite.
It worked fine for me so far. But I changed my compiler to a newer version and did not need it anymore.
You can also use (a rather small) subset of Microsofts implementation. If you do not need the
span
-classes. These aregsl_assert.h
(Expects
,Ensures
) andgsl_utils.h
(narrow
,final_act
, ...). I think I might have adjusted just someconstexpr
related things.