Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-20better check for branch opt (#724)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Simplified optimization in span::operator[]
2018-08-17Fix #717 - Add empty() to strided_span (#718)Stephan Dollberg
2018-08-17Dev/annagrin/explicit notnull transition description (#722)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Improved description how to make transition to explicit not_null constructor
2018-08-17Dev/annagrin/opt neg branch (#721)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Added optimization that removes a branch from span::operator[] * minor beauty fix * added a better message for the optimization, fixed signed/unsigned warning * better check fir wrap-around possibility
2018-08-13Dev/annagrin/sloppy not null (#712)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * added transition helper sloppy_not_null * Moved gsl_transition to a samples folder * Fixed build break and static analysis warnings
2018-08-13Dev/annagrin/make not null (#711)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Added make_not_null helper to create a not_null Introduction of explicit not_null constructor made it cumbersome to create not_nulls in c++14. Adding make_not_null helper. Usage (see tests): int i = 42; auto x = make_not_null(&i); helper(make_not_null(&i)); helper_const(make_not_null(&i)); * Added std::forward to make_not_null, fixed some code analysis warnings * Fix build break in VS2015 Release configuration * Fix build break in VS2015 Release configuration
2018-08-13fixed typoAnna Gringauze
2018-08-13fix cppcorecheck warnings (#703)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Fixed CppCoreCheck warnings in GSL and tests - Added CMakeSettings.json for VS Open Folder configuration - So we can easily run CppCoreCheck in VS - Fixed CppCorecheck warnings where it made sense - Suppressed the rest - Some suppression does not work due to compiler/tool bugs, so replaced by #pragma disable - CppCoreCheck has noise, suppressed those with comments - Catch produces many warnings, blanket-supressed them all - Had to fix clang formatting to keep attributes in place - clang-format does not support attributes, so I am using - "CommentPragmas: '^ NO-FORMAT:'" to skip formatiting on them - Removed GSL_NOEXCEPT macro, removed incorred noexcepts * Ignore unknown attributes * ignore unknown attributes in noexception mode tests * fixed C26472 in at() * created GSL_SUPPRESS macro to allow all compilers to parse suppression attributes * try to fix gcc compilation problems with attributes * ignore gsl::suppress for gcc * move suppression to function level on return statements clang5.0 and up does not allow attributes on return statemets in constexpr functions * move suppression to function level on return statements * use GSL_SUPPRESS in algorithm_tests * Addressed PR comments
2018-08-13replace uses of GSL_NOEXCEPT macro (#719)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * removed GSL_NOEXCEPT - Removed GSL_NOEXCEPT macro - Replaced by noexcept keyword when needed - removed noexcept where a function could throw * remove unneded undef * fixed replace errors * removed noexcept where function can throw
2018-08-03Explicitly check for availability of std::byte (fixes #713) (#714)Stefan Reinhold
* Explicitly check for availbility of std::byte GCC > 7.3 defines __cpp_lib_byte >= 201603 when std::byte is available. On libc++ std::byte is available since version 5.0. This can be checked with _LIBCPP_VERSION >= 5000. This fixes 713. * Add missing \ in preprocessor check
2018-08-01Suppress warnings on VS (#642)beinhaerter
- gsl::narrow, gsl::narrow_cast and gsl::at are the safe variants suggested by CppCoreGuideline. It does not make sense to let VS warn inside the implementation of these functions that unsafe static_cast is used and that the safe variants shall be used. - Suppress warning that throw_exception can be declared noexcept (for the GSL_TERMINATE_ON_CONTRACT_VIOLATION case)
2018-08-01Dev/annagrin/failfast in noexcept mode windows (#710)Anna Gringauze
made terminate call __fastfail in noexcept mode when using msvc
2018-07-14Test broken size (#704)Daniel599
* added test for size check (#590) * added #if for gcc 6.4 bug (#590) * hopefully fix #if for gcc 6.4 bug (#590) * fixed CHECK usage (#590) * gcc broken size bug is only when using optimizations
2018-06-15Added c++17 test configurations for clang5.0 and clang6.0 (#697)Anna Gringauze
2018-06-15Added testing for c++17 to latest compilers with test with (#692)Anna Gringauze
* Added testing with std=c++17 for latest compilers Added running latest compilers with -std=c++17 option to CI the test matrix, Updated cmake configuration to allow passing c++ standard on the command line. * attempt to fix appveyor break * added clang6.0, removed c++17 tests for clang 5.0 * commented out tests for clang with c++17 die to issue #695 * Addresed comments
2018-06-15Fix GCC8 warnings 'useless cast to type'. (#691)Matthieu Poullet
2018-06-08fix gcc build (gcc 7) (#690)menete
simple solution, disable the specific warning
2018-06-07Added template argument deduction for not_null (#689)Anna Gringauze
* Added template argument deduction for not_null This allows compilers with c++17 support to infer template instantiation types when calling not_null constructor: int foo(not_null<const int*> x); int main() { int t = 0; not_null x{ &t }; return foo(not_null{ &t }); } * replaced deduction guides by a simple constructor * Updated tests * fixed check for availability of std::byte * testing c++1z on clang * fixed cmakelists extra endif * include cstddef header for clang and gcc in pointers * fixed a typo * fix missing nullptr_t type * fixed typo in CMakeLists.tst * change approach to c++17 testing, step one: revert cmake testing, update clang5.0 package removed using latest c++ due to clang5.0 failing, update clang5.0 travis config to use llvm-toolchain-trusty-5.0 * addressed comments
2018-05-29Add as_bytes for basic_string_span, fixes issue #655 (#683)beinhaerter
2018-05-23Add usage for check-and-unwrap of MS STL iterators (#687)Anna Gringauze
* Add usage for check-and-unwrap of MS STL iterators This is Billy ONeal's PR #682 with a typo fixed. See corresponding change here: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/msvc/commit/ca77129308c775f422ecef0c01ad460f75c462ad That change officially exposes the STL's range checking machinery, available in MSVC++ "15.8"+ This change augments GSL span::iterator to call into that newly exposed machinery. _Verify_range(cit, cit) Requests that the iterator type check that the parameters form a valid [First, Last) range iterator pair. This replaces _DEBUG_RANGE and supporting machinery. The standard library provides a version for pointers under _IDL != 0; otherwise they are normally provided via hidden friend functions. Note that declaring some of these hidden friends for "wrapper" iterators like move_iterator and reverse_iterator triggers VSO#610735. cit._Verify_offset(difference_type _Off) For random-access iterators, performs any asserts that would be performed by i += _Off; except with possibly a better error message and without moving the iterator. cit._Unwrapped() Returns an "unchecked" or "unwrapped" iterator which has previously been validated. The iterator may have been validated by a call to _Verify_range or _Verify_offset (above), or by seeking a checked iterator to a "high water mark" point. it._Seek_to(cit) / it._Seek_to(return value from _Unwrapped()) Moves the position of the checked iterator it to the position of the unchecked iterator supplied. Generally not intended to perform range checks. * Fixed build break in VS2015 * fixed constexpr build break when using VS2015
2018-05-21Merge pull request #678 from sizmailov/sizmailov-patch-1Gabriel Dos Reis
Update .travis.yml
2018-05-10[span] Tell MSVC how to avoid range-checking (#664)Casey Carter
* [span] implement non-member + as a hidden friend Drive-by: remove garbage `operator-(difference_type, span_iterator)`. * [span] Use pointers for range-based-for on MSVC
2018-05-07Update .travis.ymlSergei Izmailov
Fix a typo `clang40` -> `clang50` (#677)
2018-05-03make terminate_handler __cdecl (#673)Anna Gringauze
2018-05-01Add __may_alias__ attribute to gsl::byte (#668)Stephan Dollberg
C++17 defines `std::byte*` to have the same aliasing properties as `char*`. Hence, we mark it with the `__may_alias__` attribute under gcc and clang. Based on the fix by Martin Moene in byte-lite. Fixes #663
2018-05-01Cmake version updated in README (#669)Michal Kaptur
2018-04-27v2.0 Patch (#641)Rian Quinn
Signed-off-by: Rian Quinn <rianquinn@gmail.com>
2018-04-25not_null constructor is now explicit (#659)ericLemanissier
solves #395
2018-04-25Fix clang-tidy warning about wrong comment on closing namespace (#654)beinhaerter
2018-04-25final_action move assignment operator =delete against C26432 (#660)beinhaerter
This suppresses warning C26432 on VS2017. Fixes issue #653.
2018-04-25Make gsl::details::throw_exception not copy exception object (#667)Stephan Dollberg
This fixes the build with clang 7 which introduces a new warning `-Wreturn-std-move` which warns about needless copies when a move operation is available (see https://reviews.llvm.org/rL329914). We take the exception object by uref so we should throw the forwarded version.
2018-04-19Updated README to record another platform report.Neil MacIntosh
As per #644.
2018-03-16Enable usage of gsl::narrow with exceptions disabled (#640)v1.0.0Anna Gringauze
* Enable usage of gsl::narrow with exceptions disabled This solution uses the approach of boost::asio to enabling usage of the library in environments where exception usage is either prohibited or not feasible (due to code size constraints). A function template gsl::throw_exception has been added, which in a normal environment just throws the exception. However, when GSL_TERMINATE_ON_CONTRACT_VIOLATION is defined the function is only declared by gsl and the definition of this function template must be supplied by the library's user. Closes: #468 Signed-off-by: Damian Jarek <damian.jarek93@gmail.com> Addition: - understand STL no exception macro - use function static variable to set termination handler in kernel mode - add compile-only tests for no-exception mode * added termination tests and fixed bugs * disabled warning C4577 for msvc 2015
2018-03-15simplified constructors and removed GSL_NOEXCEPT in span (#639)Anna Gringauze
- simplified storage constructors to reduce branching - eliminated null check for constructor from array - removed GSL_NOEXCEPT in span
2018-03-05Fix warning 4996 on Microsoft compiler (#633)Alex Howlett
2018-03-04Fix return type of templated span.subspan() (#625)Neil MacIntosh
* Added support for returning fixed-spize spans from subspan(). * Addressed issues from code review. * Took simpler approach to static data member. * Subtle fix to support MSVC 15. * Helps to not introduce extraneous >
2018-03-04fixed noexept warnings (#632)Anna Gringauze
* fixed noexept warnings - Removed conditional compilation for throwing version of GSL vs fail_fast because we don't want users of the code to see differences in the span interface dependent on error mechanism chosen - Removed noexcept from functions that may fail at runtime - Fixed CppCoreCheck warnings related to missing and incorrect noexcept - do not warn on unnown attributes for GCC and Clang * remove suppress that does not compiler for clang and gcc
2018-03-04make explicit not_null move constructor so it is noexcept (#630)Zac Hansen
* make explicit not_null move constructor so it is noexcept * added test for not_null being noexcet move constructible
2018-02-24constexpr for make_span (#627)beinhaerter
2018-02-22add gsl::index typedef (#620)paweldac
* rename index in multi_span to span_index gsl::index is name reserved for different type * add gsl::index typedef cppcoreguidelines referece: ES.107: Don't use unsigned for subscripts, prefer gsl::index https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-subscripts * rename span_index to multi_span_index
2018-02-21Remove inline added for the now unsupported MSVC 2013. (#585)Johel Ernesto Guerrero Peña
2018-02-21Remove length synonym on span (#613)Neil MacIntosh
2018-02-21gsl::index bug fix (#624)caleb
Fixing a bug in the != operator in the gsl::index class
2018-02-14Fix code analysis warning in multi_span (#606)beinhaerter
Prevents MSVC code analysis warning ...\gsl\include\gsl\multi_span(1055): warning C26440: Function 'gsl::dim_t<-1>::dim_t<-1>' can be declared 'noexcept' (f.6: http://go.microsoft.com/fwlink/?linkid=853927).
2018-02-14Use in-class init for final_action members (C.48) (#601)Tamir Bahar
* Use in-class init for final_action members (C.48) Initialize `invoke_` in-class, according to http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c48-prefer-in-class-initializers-to-member-initializers-in-constructors-for-constant-initializers * Empty commit to trigger build.
2018-02-14Fix wrong check of the CMAKE_VERSION (#602)Jérémie Delaitre
`CMAKE_VERSION_MAJOR` is just the first component of the CMake version (e.g. 3 for 3.10.1) which compares less than `3.7.9` if it is less than 3. The proper variable to compare is `CMAKE_VERSION` which contains the full version number.
2018-02-12add throw on nullptr CTOR test (#577)menete
2018-02-12Merge pull request #616 from neilmacintosh/tidy-comparison-opsAnna Gringauze
Tidy up span comparison ops
2018-02-12Merge pull request #615 from neilmacintosh/remove-move-opsAnna Gringauze
Remove move ops from span
2018-02-12Merge pull request #614 from neilmacintosh/remove-nullptr-t-ctorAnna Gringauze
Remove from-nullptr_t constructor from span