We shouldn't be moving these `final_action`s around, that wasn't part of the C++CG design requirements.
Went back to the simple version of `final_action`.
* is_comparable_to_nullptr for better static_assert
Trying `gsl::not_null<char> p2{ 0 };` on VS2019 the current implementation would trigger
>error C2446 : '!=' : no conversion from 'nullptr' to 'int'
>message: A native nullptr can only be converted to bool or , using reinterpret_cast, to an integral type
>message: see reference to class template instantiation 'gsl::not_null<char>' being compiled
>error C2955 : 'std::is_convertible' : use of class template requires template argument list
>message: see declaration of 'std::is_convertible'
>error C2039 : 'value' : is not a member of 'std::is_convertible<_From,_To>'
>error C2065 : 'value' : undeclared identifier
The new implementation gives much shorter and clearer message and does exactly as the `static_assert` intends to do:
> error C2338: T cannot be compared to nullptr.
> message : see reference to class template instantiation 'gsl::not_null<char *>' being compiled
* Update include/gsl/pointers
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Werner Henze <w.henze@avm.de>
Co-authored-by: Casey Carter <cartec69@gmail.com>
* Azure pipeline (#8)
* azure-pipeline test
* nl @ eof
* trimming the pipeline and adding debug steps
* removing redundant lines
* change ctest to script cmd and remove debug
* removed bad char
* added dir change for ctest
* explicit output file and cmake standard
* test cat
* more ctest tests
* injecting failure in test for validation
* another test
* removing bad test
* massive matrix
* added parallel
* commenting everything but xcode out for testing purposes
* uncomment the other tests
* testing some variables
* rename
* changed macos versions
* adding one more layer of templates
* fixing jobs.yml
* idk what i'm doing
* slight modifications
* maybe some spaces will help
* removing 'variables.'
* another test
* adding back pr w/ autocancel
* adding failing test to validate error = failing task
* remove failing test
* trigger master
* nl in steps.yml
* removing deprecation of basic_zstring and derived types. only *string_span should have been deprecated
* Azure pipeline (#8)
* azure-pipeline test
* nl @ eof
* trimming the pipeline and adding debug steps
* removing redundant lines
* change ctest to script cmd and remove debug
* removed bad char
* added dir change for ctest
* explicit output file and cmake standard
* test cat
* more ctest tests
* injecting failure in test for validation
* another test
* removing bad test
* massive matrix
* added parallel
* commenting everything but xcode out for testing purposes
* uncomment the other tests
* testing some variables
* rename
* changed macos versions
* adding one more layer of templates
* fixing jobs.yml
* idk what i'm doing
* slight modifications
* maybe some spaces will help
* removing 'variables.'
* another test
* adding back pr w/ autocancel
* adding failing test to validate error = failing task
* remove failing test
* trigger master
* nl in steps.yml
* remove forced decay of array reference to pointer in span array ctor
narrow() is now in gsl_narrow rather than gsl_util. Include gsl_narrow when exceptions are enabled. Ensures that #include <gsl/gsl> includes entire library as advertised in the documentation.
Co-authored-by: Bowie Owens <bowie.owens@csiro.au>
- `s[s.size() - 1]` is wrong for empty `s`, so `Expects(s.size() > 0)`
- no hard coded `'\0'`but `value_type{}`
- hard code `empty()` to return `false`
- simplify `as_string_span`: can never be `empty`
- clarify comment on `ensure_z`