# GSL: Guidelines Support Library
[![Build Status](https://dev.azure.com/cppstat/GSL/_apis/build/status/microsoft.GSL?branchName=main)](https://dev.azure.com/cppstat/GSL/_build/latest?definitionId=1&branchName=main)
The Guidelines Support Library (GSL) contains functions and types that are suggested for use by the
[C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines) maintained by the [Standard C++ Foundation](https://isocpp.org).
This repo contains Microsoft's implementation of GSL.
The entire implementation is provided inline in the headers under the [gsl](./include/gsl) directory. The implementation generally assumes a platform that implements C++14 support.
While some types have been broken out into their own headers (e.g. [gsl/span](./include/gsl/span)),
it is simplest to just include [gsl/gsl](./include/gsl/gsl) and gain access to the entire library.
> NOTE: We encourage contributions that improve or refine any of the types in this library as well as ports to
other platforms. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more information about contributing.
# Project Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
# Usage of Third Party Libraries
This project makes use of the [Google Test](https://github.com/google/googletest) testing library. Please see the [ThirdPartyNotices.txt](./ThirdPartyNotices.txt) file for details regarding the licensing of Google Test.
# Supported features
## Microsoft GSL implements the following from the C++ Core Guidelines:
Feature | Supported? | Description
-----------------------------------|:----------:|-------------
[**1. Views**][cg-views] | |
owner | ☑ | an alias for a raw pointer
not_null | ☑ | restricts a pointer / smart pointer to hold non-null values
span | ☑ | a view over a contiguous sequence of memory. Based on the standardized verison of `std::span`, however `gsl::span` enforces bounds checking. See the [wiki](https://github.com/microsoft/GSL/wiki/gsl::span-and-std::span) for additional information.
span_p | ☐ | spans a range starting from a pointer to the first place for which the predicate is true
basic_zstring | ☑ | A pointer to a C-string (zero-terminated array) with a templated char type
zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char
czstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char
wzstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of wchar_t
cwzstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const wchar_t
u16zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char16_t
cu16zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char16_t
u32zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of char32_t
cu32zstring | ☑ | An alias to `basic_zstring` with dynamic extent and a char type of const char32_t
[**2. Owners**][cg-owners] | |
unique_ptr | ☑ | an alias to `std::unique_ptr`
shared_ptr | ☑ | an alias to `std::shared_ptr`
stack_array | ☐ | a stack-allocated array
dyn_array | ☐ | a heap-allocated array
[**3. Assertions**][cg-assertions] | |
Expects | ☑ | a precondition assertion; on failure it terminates
Ensures | ☑ | a postcondition assertion; on failure it terminates
[**4. Utilities**][cg-utilities] | |
move_owner | ☐ | a helper function that moves one `owner` to the other
byte | ☑ | either an alias to std::byte or a byte type
final_action | ☑ | a RAII style class that invokes a functor on its destruction
finally | ☑ | a helper function instantiating `final_action`
GSL_SUPPRESS | ☑ | a macro that takes an argument and turns it into `[[gsl::suppress(x)]]` or `[[gsl::suppress("x")]]`
[[implicit]] | ☐ | a "marker" to put on single-argument constructors to explicitly make them non-explicit
index | ☑ | a type to use for all container and array indexing (currently an alias for std::ptrdiff_t)
joining_thread | ☐ | a RAII style version of `std::thread` that joins
narrow | ☑ | a checked version of narrow_cast; it can throw `narrowing_error`
narrow_cast | ☑ | a narrowing cast for values and a synonym for static_cast
narrowing_error | ☑ | a custom exception type thrown by `narrow()`
[**5. Concepts**][cg-concepts] | ☐ |
## The following features do not exist in or have been removed from the C++ Core Guidelines:
Feature | Supported? | Description
-----------------------------------|:----------:|-------------
strict_not_null | ☑ | A stricter version of `not_null` with explicit constructors
multi_span | ☐ | Deprecated. Multi-dimensional span.
strided_span | ☐ | Deprecated. Support for this type has been discontinued.
basic_string_span | ☐ | Deprecated. Like `span` but for strings with a templated char type
string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of char
cstring_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of const char
wstring_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of wchar_t
cwstring_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of const wchar_t
u16string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of char16_t
cu16string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of const char16_t
u32string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of char32_t
cu32string_span | ☐ | Deprecated. An alias to `basic_string_span` with a char type of const char32_t
This is based on [CppCoreGuidelines semi-specification](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gsl-guidelines-support-library).
[cg-views]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gslview-views
[cg-owners]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gslowner-ownership-pointers
[cg-assertions]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gslassert-assertions
[cg-utilities]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gslutil-utilities
[cg-concepts]: https://github.c
没有合适的资源?快使用搜索试试~ 我知道了~
独立于传感器的 XML 库_C++_代码_相关文件_下载
共2923个文件
cpp:818个
h:724个
c:272个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 2 浏览量
2022-07-13
18:04:11
上传
评论
收藏 127.46MB ZIP 举报
温馨提示
起源 SIX(与传感器无关的 XML)库是由国家地理空间情报局 (NGA) 与Maxar(前身为 Radiant Solutions 和 MDA)合作开发的。政府拥有“无限权利”,并正在发布该软件,以通过为开发商提供将事情推向新方向的机会来增加政府投资的影响。LGPL 3.0 许可证中规定了软件的使用、修改和分发权利。 SIX 库是一个跨平台的 C++ API,用于读写 NGA 的复相历史 (CPHD)、复数 (SICD) 和衍生 (SIDD) 传感器独立雷达格式;Python 绑定也逐渐被添加。此外,它是 SIDD格式的官方参考实现库。该库还提供了SICD 和 SIDD 文档中许多方程的传感器模型实现。该传感器模型实施为 SICD 和 SIDD CSM(社区传感器模型)实施提供了基础。 它可在较宽松的 GNU 公共许可证 (LGPL) 下作为开源软件使用。该许可证在开源社区中普遍使用,并允许非开源应用程序使用该库而不会受到处罚。与其他开源项目一样,该库按原样提供,没有任何保证。 更多详情、使用方法,请下载后细读READ
资源推荐
资源详情
资源评论
收起资源包目录
独立于传感器的 XML 库_C++_代码_相关文件_下载
(2923个子文件)
0_build 249B
algorithm 2KB
algorithm 2KB
assert 4KB
assert 4KB
embedded_xml.bin 77KB
bit 2KB
NITRO.bmp 20KB
NITRO_small.bmp 2KB
byte 7KB
byte 7KB
ImageIO.c 320KB
NitfWriter.c 80KB
Record.c 74KB
NitfReader.c 71KB
OpenJPEGImpl.c 57KB
LibjpegDecompress.c 48KB
ImageSubheader.c 38KB
DownSampler.c 38KB
Field.c 36KB
TREUtils.c 34KB
MetafileReader.c 34KB
TRECursor.c 33KB
DateTime.c 32KB
test_ImageIO_support.c 31KB
PluginRegistry.c 29KB
MetafileWriter.c 29KB
SENSRB.c 29KB
show_nitf.c 28KB
JasPerImpl.c 27KB
test_writer_3.c 27KB
test_image_io.c 26KB
test_fileIO.c 24KB
test_create_xmltre.c 22KB
Utils.c 20KB
test_insert_raw_xmltre.c 19KB
test_utils.c 18KB
ComplexityLevel.c 17KB
FileHeader.c 16KB
test_add_cgm.c 15KB
test_des_create.c 15KB
HashTable.c 15KB
List.c 14KB
J2KCompress.c 14KB
SegmentSource.c 14KB
test_add_masks.c 14KB
CMETAA.c 14KB
test_clevel.c 14KB
test_image_loading.c 14KB
test_writer_s.c 14KB
BandSource.c 14KB
Extensions.c 13KB
test_ImageIO_read_data.c 13KB
IOInterface.c 13KB
DefaultTRE.c 12KB
test_make_pattern.c 12KB
ImageWriter.c 11KB
ENGRDA.c 11KB
BANDSB.c 10KB
test_j2k_nitf.c 10KB
test_create_nitf.c 10KB
test_1band_rw_line.c 9KB
test_imsub_clone.c 9KB
J2KDecompress.c 8KB
test_dump_masks.c 8KB
Tree.c 8KB
test_nrt_datetime.c 8KB
test_fhdr_clone.c 8KB
CSEXRB.c 7KB
test_ext_iter.c 7KB
test_tre_mods.c 7KB
test_des_read.c 7KB
RSMECA.c 7KB
SimpleContainerImpl.c 7KB
test_field_set.c 7KB
TREPrivateData.c 6KB
RSMIDA.c 6KB
GraphicSubheader.c 6KB
FileSecurity.c 6KB
IOHandleWin32.c 6KB
DirectBlockSource.c 6KB
SOURCB.c 6KB
LabelSubheader.c 6KB
test_des.c 6KB
ACFTA.c 6KB
test_des_write.c 6KB
DESubheader.c 6KB
test_field.c 6KB
test_geo_utils.c 6KB
SimpleComponentImpl.c 6KB
ASTORA.c 5KB
RowSource.c 5KB
test_replace_field.c 5KB
test_read_acftb.c 5KB
TextSubheader.c 5KB
test_list.c 5KB
image_footprint_kml.c 5KB
BandInfo.c 5KB
test_ImageIO_writePattern.c 5KB
TRE.c 5KB
共 2923 条
- 1
- 2
- 3
- 4
- 5
- 6
- 30
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功