1
0
mirror of https://github.com/microsoft/GSL.git synced 2025-05-14 10:19:55 -04:00
Commit Graph

474 Commits

Author SHA1 Message Date
14d50a6f77 Minor compilation fixes and workarounds. 2015-11-03 12:44:09 -08:00
16d1e77568 Merge remote-tracking branch 'origin' into dev/neilmac/indextype 2015-11-02 19:01:59 -08:00
ba3126105b Merge pull request from archshift/patch-1
array_view: explicitly initialize constexpr function variables
2015-11-02 11:53:08 -08:00
b39571781e array_view: explicitly initialize constexpr function variables 2015-11-02 11:47:14 -08:00
a4fa2b3bd9 Merge branch 'master' of https://github.com/Microsoft/GSL
Conflicts:
	include/array_view.h
	tests/array_view_tests.cpp
2015-10-28 16:53:53 -07:00
0cbdc7036d Fixed string_view::ensure_z() for const char*. 2015-10-26 18:23:14 -07:00
ace9ab9d3b Building again. Some tests failing. 2015-10-23 19:49:17 -07:00
561da1cd00 fix clang warning on unused function parameter 2015-10-21 13:31:00 +03:00
1c208b33d0 Removed specializations for Rank=1 2015-10-19 14:19:46 -07:00
1e36db9695 Merge pull request from samuel3/master
std::hash support for gsl::not_null.
2015-10-19 13:20:53 -07:00
5f26ddac70 Replaced index constructor from initializer list by a constructor from static list
Conflicts:
	include/array_view.h
2015-10-19 12:35:38 -07:00
8e2acc9c90 std::hash support for gsl::not_null. 2015-10-17 09:28:05 +02:00
a544ada8fe std::hash support for gsl::not_null. 2015-10-17 08:53:58 +02:00
a4654a46b5 Removed arrow_proxy class, fixes bugs in reverse bounds_iterator 2015-10-16 17:15:56 -07:00
01868f2516 Fix missing header for std::divides. 2015-10-15 16:48:38 -07:00
d0f09e768e Merge branch 'master' of https://github.com/Microsoft/GSL
Conflicts:
	include/array_view.h
2015-10-15 16:38:53 -07:00
f45fedbec2 Partway through removing configurable SizeType. 2015-10-15 14:29:35 -07:00
2cdedda7e4 Adding missing include library to array_view.h 2015-10-15 13:19:24 -07:00
fdf8643471 Fixes for gcc 2015-10-14 21:27:41 -07:00
546f8cc130 Added tests for index size_type conversions 2015-10-12 18:35:21 -07:00
db38497d05 Removed coordinate_facade class 2015-10-12 16:52:11 -07:00
fda8e12310 Fix remove maybe_null 2015-10-05 13:34:50 -07:00
b8ec73a179 Fix moving a final_act twice 2015-10-02 15:58:23 -07:00
df88352c1d Merge pull request from kernhanda/kernhanda/use_algorithms
We should be using standard algorithms where possible.
2015-10-02 09:12:26 -07:00
d531680a31 Improved macros used for non-compliant compilers. 2015-09-30 21:54:08 -07:00
831c6926df Adding noexcept to finally, final_act, narrow_cast. Fixes . 2015-09-30 15:10:24 -07:00
d06f7ff779 Renamed Final_act to final_act as per issue . 2015-09-30 12:39:18 -07:00
e8ff01e543 Commit to address issue #103... 2015-09-30 12:50:42 -04:00
761554f68d Correct misleading text in static_assert. Fixes issue . 2015-09-29 16:54:00 -07:00
ef626fd33a Renamed namespace to 'gsl'. Renamed macro to configure testing. 2015-09-29 16:41:37 -07:00
1d11cd1ed1 Fixing typo in move constructor implementation that resulted in compile error during tests. 2015-09-29 00:00:21 -05:00
422e7164d5 Fixing move constructor of Final_act to take non-const r-value reference and move properly from other Final_act object so that correctness is not dependent on copy elison. 2015-09-28 23:40:25 -05:00
065f4880c3 Merge pull request from trebconnell/fixmaybenull
Fix issue 
2015-09-28 18:54:31 -07:00
444bf9640a Fix issue 2015-09-28 18:49:53 -07:00
318cee0489 Merge pull request from trebconnell/fixmaybenull
Fix issue 
2015-09-28 18:40:57 -07:00
b29566628e Revert "Fix issue "
This reverts commit a46d6fcf0d69a20f630cd590ba0867a1cf6a8cb4.
2015-09-28 18:26:35 -07:00
a46d6fcf0d Fix issue 2015-09-28 15:17:37 -07:00
27ff004e84 Merge branch 'master' into fixmaybenull
Conflicts:
	include/gsl.h
	tests/maybenull_tests.cpp
2015-09-28 14:56:08 -07:00
e46160c18e it's better to pass a small (e.g. 16 bytes) object by value then by const reference 2015-09-28 23:20:28 +03:00
3402b92ef6 fix clang -Wunused-parameter warnings 2015-09-28 21:20:02 +03:00
3571792058 Merge pull request from kernhanda/kernhanda/heterogenous-assignment-not_null
Add various copy assignment operators to not_null and maybe_null_*.
2015-09-28 07:05:43 -07:00
6554e83c79 Macro expand constexpr to nothing under MSVC
Replace `_CONSTEXPR` with plain `constexpr`.
2015-09-28 05:10:44 -07:00
7d8e609faf Merge remote-tracking branch 'upstream/master' into kernhanda/heterogenous-assignment-not_null 2015-09-28 07:37:06 +00:00
783eaabf9d Add various copy assignment operators to not_null and maybe_null_*.
Also removed unused constant member variable that seemed to be there
to prevent maybe_null_* being used with anything other than a pointer,
which is being taken care of with a static_assert now.
2015-09-28 07:35:18 +00:00
99746e2d57 Correct fix for int/size_t mismatch. 2015-09-27 16:53:58 -07:00
fb91393bb2 Fixing size_t/int mismatch in loops. 2015-09-27 16:25:43 -07:00
f1be21aa36 Merged Microsoft/GSL:master into branch and resolved conflicts. 2015-09-27 23:25:20 +00:00
2b6d90436f not_null and maybe_null variants should only work on nullptr-assignable types.
This is in accordance with the GSL.View guidance on not_null and maybe_null
types in the CppCoreGuidelines document.
2015-09-27 19:35:23 +00:00
599a354b1c Merge pull request from kernhanda/kernhanda/size_t
Rank and dimensions should be size_t.
2015-09-27 12:21:22 -07:00
437791e504 GSL::finally can make use of move semantics
for eg consider this case
[code]
string value = "someVeryLongErrorMessageIAm";
finally([value] { PrintErrorMessage(value); }
[/code]
With the current changes before the call to PrintErrorMessage there will be 3 calls to copy constructor for string(1 when it's captured in closure, 2nd when finally is called and 3rd when it's passed to Final_act . With my patch there will be 1 call to the copy constructor and 2 to the move constructor for the scenario in example, so 2 potential deep copies will be saved for some objects.
Validated that code builds from root, and all tests pass after my change. Also validated that indeed copy constructor calls are saved for objects that support move semantics.
2015-09-27 16:11:12 +05:30