cstddef was being included to detect whether GSL_USE_STD_BYTE should be
set to 0 or 1. But if the user provided GSL_USE_STD_BYTE no detection is
required and the header was never included.
* Added c++17 test configurations for clang5.0 and clang6.0
* Fix#739 correct cppcorecheck warnings for clang-cl
* Add clang-cl configurations
* Corrections Appveyor;
Temporarily disable msvc compilation for faster testing (#741)
* Add path to clang-cl.exe (#741)
* Escape backslash in path (#741)
* Update vcpkg (#741)
* Check vcpkg version; try without building vcpkg; use latest clang-cl from path (#741)
* Fix blocks in ps script (#741)
* Try accessing APPVEYOR_BUILD_FOLDER variable (#471)
* Update span size() bug confirmation test for GCC 6.5 (#741)
* MSVC flags to Clang-cl; disable c++98-compat and undefined macro warnings (#741)
* Suppress clang warning on tests (missing-prototypes) (#741)
* Fix clang warning -Wnewline-eof (#741)
* Fix clang warning -Wdouble-promotion (#741)
* Set linker explicitly
* Clean condition statement
* For Clang, fallback to the AppVeyor installed version of CMake
* Fix clang warning -Wmissing-variable-declarations
* Fallback to the MSVC linker until vcpkg has been updated
* Revert "Fallback to the MSVC linker until vcpkg has been updated"
This reverts commit 7263f3289e.
* Fix clang warning -Wunused-member-function
* Fix clang warning -Wmissing-noreturn
* Fix clang warning -Winvalid-noreturn on Windows
* Add macro block end comment on large #if blocks
* Workaround: fallback to mscv link.exe
* Workaround: get msvc paths into PowerShell through intermediate file
* Workaround: fix, remove "PATH=" from text
* Workaround: try with full-path; and return user PATH
* Workaround: fix, escape backslashes
* Revert all since "Workaround: fallback to mscv link.exe" did not work on AppVeyor
This reverts the commits:
bda3d6a42897062933ac0f4fb04bac1b0c19afd1a5739ea5f0
* Suppress output of git pull; remove vcpkg from cache
* Re-enable AppVeyor builds for all platforms
* Correct typo
Co-Authored-By: Farwaykorse <Farwaykorse@users.noreply.github.com>
* Add Clang-cl 7.0.0 to the supported platforms
* Revert "Fix clang warning -Wunused-member-function"
This reverts commit 6fe1a42035.
* Fix or locally suppress clang warning -Wunused-member-function
* format touched code and correct comment
* git pull --quiet
* fix logic error in workaround
* fix missing bracket
* Suppress output of mkdir
* Replace MSBuild with Ninja
* Suppress output of 7z
* Add architecture flags for Clang
* Drop workaround for lld-link
* 7-zip Overwrite and Alternative output suppression without suppressing errors
Replaces 3c1c0794dd
* AppVeyor setup and CMake before build
* reorder compiler configuration
* remove unnecessary
* remove -fno-strict-aliasing
* remove -Wsign-conversion, since before v4.0 part of -Wconversion
* -Wctor-dtor-privacy is GCC only
* remove -Woverloaded-virtual part of -Wmost, part of -Wall
* add -Wmissing-noreturn
* remove the pragmas for -Wunused-member-function
* Re-add MSBuild generator on AppVeyor
* Print CMake commands
* Add MSBuild toolset selection
* Separate Architecture setting
* clang-cl: add -Weverything
* clang-cl -Wno-c++98-compat
* clang-cl -Wno-c++98-compat-pedantic
* clang-cl -Wno-missing-prototypes
* clang-cl C++14 -Wno-unused-member-function
* clang-cl -Wundef __GNUC__
* clang++: add -Weverything
* clang++ -Wno-c++98-compat
* clang++ -Wno-c++98-compat-pedantic
* clang++ -Wno-missing-prototypes
* clang++ -Wno-weak-vtables
* clang++ C++14 -Wno-unused-member-function
* clang++ fix -Wundef _MSC_VER
* clang++ -Wno-padded
* clang++ solve -Wdeprecated
* Add AppleClang compiler target
Since CMake v3.0 use of Clang for both is deprecated
* clang++ v5.0 C++17 -Wno-undefined-func-template
* Add VS2015 + LLVM/clang-cl to AppVeyor
* Do not disable constexpr when compiling with clang-cl on Windows
* Clean-up clang-only warnings (now under -Weverything)
* Revert "Fix clang warning -Winvalid-noreturn on Windows"
This reverts commit 2238c4760e.
* Suppress -Winvalid-noreturn for the MS STL noexception workaround
* CMake: put preprocessor definition in target_compile_definitions
* Solve compiler warning C4668: __GNUC__ not defined
* Added c++17 test configurations for clang5.0 and clang6.0
* Removed explicit not_null constructor, sloppy_not_null, added strict_not_null
We added explicit not_null constructor in version 2.0.0.
It proved very difficult to switch to the new version for
large code bases that adopted previous versions of gsl,
due to not_null used extensively in the code. Still, using
explicit constructor is very benefitial for new code, since
it encorages better API design and make null checks intentional.
To resolve the issue, this change:
- removes explicit keyword from not_null constructor
- removes unneded sloppy_not_null type
- adds strict_not_null type to behave the same way as v2 not_null
- updates tests
* Removed explicit not_null constructor, sloppy_not_null, added strict_not_null
We added explicit not_null constructor in version 2.0.0.
It proved very difficult to switch to the new version for
large code bases that adopted previous versions of gsl,
due to not_null used extensively in the code. Still, using
explicit constructor is very benefitial for new code, since
it encorages better API design and make null checks intentional.
To resolve the issue, this change:
- removes explicit keyword from not_null constructor
- removes unneded sloppy_not_null type
- adds strict_not_null type to behave the same way as v2 not_null
- updates tests
* fixed build break for gcc7
* added more tests
* added more non-compiling tests
* Addressed PR comments and suppressed a code analysis warning
* Fixed test failure in not_null tests
* Span std::array c'tor uses arr.data() instead of &arr[0]
- Fixes runtime issues when constructing from an empty std::array
* Construct span with std::data if C++17 detected
* Specialize span c'tor for std::array of length 0, set storage to nullptr
* Changed &arr[0] to std::array<T, N>::data and std::address_of to protect against overloaded operator&.
* Removed the usage of `std::addressof` because it is a C++ 17 feature. Using decay for C arrays instead.
* Add unit tests for #662.
* Added c++17 test configurations for clang5.0 and clang6.0
* fixed CppCoreCheck pointer decay warning
* 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
* 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