Nicholas Guarracino
70c58cce50
Check if __GCC__ is defined first
2015-11-13 09:54:27 -05:00
Nicholas Guarracino
eae7c21177
Add workarounds for g++ 4.9
2015-11-12 16:23:37 -05:00
Neil MacIntosh
b63ec949e9
Renaming array_view and string_view, as per WG21 discussions.
2015-11-04 12:42:27 -08:00
Samuel García Salas
8e2acc9c90
std::hash support for gsl::not_null.
2015-10-17 09:28:05 +02:00
Samuel García Salas
a544ada8fe
std::hash support for gsl::not_null.
2015-10-17 08:53:58 +02:00
Treb Connell
fda8e12310
Fix #124 remove maybe_null
2015-10-05 13:34:50 -07:00
Treb Connell
b8ec73a179
Fix moving a final_act twice
2015-10-02 15:58:23 -07:00
Neil MacIntosh
d531680a31
Improved macros used for non-compliant compilers.
2015-09-30 21:54:08 -07:00
Neil MacIntosh
831c6926df
Adding noexcept to finally, final_act, narrow_cast. Fixes #92 .
2015-09-30 15:10:24 -07:00
Neil MacIntosh
d06f7ff779
Renamed Final_act to final_act as per issue #91 .
2015-09-30 12:39:18 -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
Treb Connell
444bf9640a
Fix issue #49
2015-09-28 18:49:53 -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
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
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
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
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
Neil MacIntosh
05e6b6dd4b
Added missing owner<T>, corrected array_view::sub().
2015-09-20 19:18:12 -07:00
Neil MacIntosh
a9dcbe04ff
Initial commit of library files.
2015-08-20 18:09:14 -07:00