Commit Graph

45 Commits

Author SHA1 Message Date
RicoAntonioFelix e8ff01e543 Commit to address issue #103... 2015-09-30 12:50:42 -04:00
Neil MacIntosh 761554f68d Correct misleading text in static_assert. Fixes issue #67. 2015-09-29 16:54:00 -07:00
Neil MacIntosh ef626fd33a Renamed namespace to 'gsl'. Renamed macro to configure testing. 2015-09-29 16:41:37 -07:00
john-lynch 1d11cd1ed1 Fixing typo in move constructor implementation that resulted in compile error during tests. 2015-09-29 00:00:21 -05:00
john-lynch 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
Neil MacIntosh 065f4880c3 Merge pull request #88 from trebconnell/fixmaybenull
Fix issue #49
2015-09-28 18:54:31 -07:00
Treb Connell 444bf9640a Fix issue #49 2015-09-28 18:49:53 -07:00
Neil MacIntosh 318cee0489 Merge pull request #87 from trebconnell/fixmaybenull
Fix issue #50
2015-09-28 18:40:57 -07:00
Treb Connell b29566628e Revert "Fix issue #49"
This reverts commit a46d6fcf0d.
2015-09-28 18:26:35 -07:00
Treb Connell a46d6fcf0d Fix issue #49 2015-09-28 15:17:37 -07:00
Treb Connell 27ff004e84 Merge branch 'master' into fixmaybenull
Conflicts:
	include/gsl.h
	tests/maybenull_tests.cpp
2015-09-28 14:56:08 -07:00
Kosov Eugene 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
Kosov Eugene 3402b92ef6 fix clang -Wunused-parameter warnings 2015-09-28 21:20:02 +03:00
Neil MacIntosh 3571792058 Merge pull request #78 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
Gabriel Dos Reis 6554e83c79 Macro expand constexpr to nothing under MSVC
Replace `_CONSTEXPR` with plain `constexpr`.
2015-09-28 05:10:44 -07:00
Kern Handa 7d8e609faf Merge remote-tracking branch 'upstream/master' into kernhanda/heterogenous-assignment-not_null 2015-09-28 07:37:06 +00:00
Kern Handa 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
Neil MacIntosh 99746e2d57 Correct fix for int/size_t mismatch. 2015-09-27 16:53:58 -07:00
Neil MacIntosh fb91393bb2 Fixing size_t/int mismatch in loops. 2015-09-27 16:25:43 -07:00
Kern Handa 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
Gabriel Dos Reis 599a354b1c Merge pull request #59 from kernhanda/kernhanda/size_t
Rank and dimensions should be size_t.
2015-09-27 12:21:22 -07:00
saurabh singh 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
Treb Connell 1a791992a0 Add equality operators to maybe_nul_ret 2015-09-25 12:16:39 -07:00
Kern Handa e157026807 Rank and dimensions should be size_t. 2015-09-25 00:42:38 -07:00
Treb Connell 51da13607c Fix issue #39: Add header guards 2015-09-24 18:08:34 -07:00
Treb Connell 35fb11853f Fix issues #48 #49 #50 2015-09-24 18:02:37 -07:00
Treb Connell 996aa06e08 Fix issue #45: comparing two maybe_null_dbg's can cause fail_fast 2015-09-24 14:09:40 -07:00
galik cb068d80cd missing header <stdexcept> 2015-09-21 22:51:46 +01:00
Gabriel Dos Reis 65655da087 Tidy testing for _MSC_VER 2015-09-21 03:09:33 -07:00
Gabriel Dos Reis 4573197546 Merge pull request #10 from galik/master
Prevent unused parameter warnings and unknown #pragma warnings on GCC.
2015-09-21 01:51:22 -07:00
Neil MacIntosh 05e6b6dd4b Added missing owner<T>, corrected array_view::sub(). 2015-09-20 19:18:12 -07:00
galik cab9bda249 Prevent unused parameter warnings and unknown #pragma warnings on GCC. 2015-09-19 07:52:30 +01:00
Anna Gringauze 9dac178768 Formatting 2015-09-14 19:08:03 -07:00
Anna Gringauze 1a86498733 Formatting 2015-09-14 18:55:06 -07:00
Neil MacIntosh 006721ce8a Merge remote-tracking branch 'upstream/dev/annagrin/strided_array_view_bugfixes' into dev/annagrin/strided_array_view_bugfixes
Conflicts:
	include/array_view.h
2015-09-14 17:22:56 -07:00
Anna Gringauze e5b79d242c Reverted formatting changes 2015-09-14 16:38:25 -07:00
Anna Gringauze 18cd9801b5 Reverted formatting changes 2015-09-14 16:34:26 -07:00
Neil MacIntosh 383dc507a4 Fixes for review feedback. 2015-09-14 15:41:40 -07:00
Neil MacIntosh 9a29712022 Ensuring compilation works for VS 2013. 2015-09-14 15:11:07 -07:00
Neil MacIntosh ef6cc65053 Fixed compilation issues with Clang and GCC on Linux. 2015-09-14 21:26:17 +00:00
Anna Gringauze 17ed5c3664 Fixed issues in strided_array_views, added tests 2015-09-14 13:03:28 -07:00
Neil MacIntosh 75f31dabe9 Removed Debug build warnings from MSVC STL. 2015-08-27 22:15:44 -07:00
Neil MacIntosh 9b40a0a7c8 Fixed compile error with GCC/clang. 2015-08-27 19:49:27 -07:00
Neil MacIntosh 9f9fad9620 Implemented comparison operators on array_view. 2015-08-27 18:13:49 -07:00
Neil MacIntosh a9dcbe04ff Initial commit of library files. 2015-08-20 18:09:14 -07:00