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
62226021a8
Merge pull request #74 from neilmacintosh/master
...
Fixed leak in owner<> test. Ha!
2015-09-27 18:18:14 -07:00
Neil MacIntosh
bb169976da
Fixed leak in owner<> test. Ha ha ha!
2015-09-27 18:06:51 -07:00
Neil MacIntosh
1a0df71f2f
Merge pull request #73 from neilmacintosh/master
...
Correct fix for int/size_t mismatch.
2015-09-27 16:58:07 -07: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
f1be21aa36
Merged Microsoft/GSL:master into branch and resolved conflicts.
2015-09-27 23:25:20 +00:00
Neil MacIntosh
bad8545eee
Merge pull request #70 from kernhanda/kernhanda/not_maybe_null
...
not_null and maybe_null variants should only work on nullptr-assignable types.
2015-09-27 12:43:44 -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
Gabriel Dos Reis
66131c985d
Merge pull request #69 from bashrc-real/patch-1
...
Guide::finally can make use of move semantics
2015-09-27 12:17:27 -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
Seth Cantrell
96e5757181
Add .clang-format file
...
To have any hope of achieving consistent formatting there needs to be
a standard and a mechanism for enforcing it. This is a first step in
that direction.
This format specification is intended to mimic the existing style
insofar as the current source has any consistent style. For example
the determination as to whether ref qualifiers should bind to the
type or variable name was made by trying both and seeing which
produced fewer changes. One exception is the use of tabs vs. spaces,
which was decided based on a comment by neilmacintosh [here][1].
To use clang-format with Visual Studio [download][2] and install the
clang-format plugin. In VS ctrl-r, ctrl-f formats the current line or
text selection.
[1]: https://github.com/Microsoft/GSL/issues/55
[2]: http:llvm.org/builds/
2015-09-26 18:00:54 -04:00
Kern Handa
c4f9b87d96
We should be using standard algorithms where possible.
...
Use of algorithms in the STL should be promoted where possible.
Also fixed up some whitespace issues.
2015-09-25 17:11:17 -07:00
Neil MacIntosh
b40d3466c6
Merge pull request #52 from trebconnell/addheaderguards
...
Fix issue #39 : Add header guards
2015-09-25 15:17:05 -07:00
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
Neil MacIntosh
8ae77b1fd5
Merge pull request #46 from trebconnell/fixmaybenull
...
Fix issue #45 : comparing two maybe_null_dbg's can cause fail_fast
2015-09-24 15:22:43 -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
Gabriel Dos Reis
0a88570c26
Merge pull request #29 from tamaskenez/master
...
add travis testing (gcc5, clang36)
2015-09-24 13:34:21 -07:00
Gabriel Dos Reis
2ae46395fa
Merge pull request #30 from PSPDFKit-labs/spelling
...
Fixes spelling of Xcode
2015-09-24 07:53:51 -07:00
Peter Steinberger
2c8886bdfb
Also renames MAC OS to OS X
2015-09-23 23:19:18 +02:00
Peter Steinberger
c3b85f9571
Fixes spelling of Xcode
2015-09-23 22:12:49 +02:00
Tamas Kenez
9b454b7a9b
add travis testing (gcc5, clang36)
...
- also relaxed CMake version to 2.8.7, the version default in travis
2015-09-23 17:43:36 +02:00
Andrew Pardoe
186001611a
Merge pull request #25 from RicoAntonioFelix/master
...
Corrected grammatical error...
2015-09-22 11:19:16 -07:00
Rico Antonio Felix
1228e17762
Corrected grammatical error...
2015-09-22 13:38:47 -04:00
Andrew Pardoe
e7c0b89ed4
Removed reference to Microsoft private fork
2015-09-21 19:58:25 -07:00
Neil MacIntosh
670c59a0b1
Merge pull request #24 from galik/master
...
Issue #23 missing header <stdexcept>
2015-09-21 18:15:41 -07:00
galik
19c5a89bca
Merge remote-tracking branch 'upstream/master'
2015-09-21 23:08:35 +01:00
galik
cb068d80cd
missing header <stdexcept>
2015-09-21 22:51:46 +01:00
Neil MacIntosh
5fb350c29e
Merge pull request #21 from dacap/add_gsl_test
...
Add add_gsl_test() function in tests/CMakeLists.txt
2015-09-21 13:31:16 -07:00
David Capello
5d9aae7430
Add add_gsl_test() function in tests/CMakeLists.txt
...
With this function we can avoid duplicated code to add a new test.
2015-09-21 16:04:06 -03:00
Gabriel Dos Reis
3d033a3ec9
Merge pull request #20 from igetgames/fix/broken-isocpp-link
...
Fix the broken isocpp.org link in README.md.
2015-09-21 11:24:19 -07:00
Marcus R. Brown
7d07140cd1
Fix the broken isocpp.org link in README.md.
2015-09-21 10:30:03 -07:00
Gabriel Dos Reis
53b866a109
Add additional platforms where GSL has been tested
2015-09-21 08:10:05 -07: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
Gabriel Dos Reis
82a247ee9b
Merge pull request #15 from neilmacintosh/dev/neilmac/missing-features
...
Added missing owner<T>, corrected array_view::sub().
2015-09-21 01:13:53 -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
Neil MacIntosh
652d886963
Merge pull request #7 from annagrin/dev/annagrin/strided_array_view_bugfixes
...
Fixes to strided_array_view and related classes.
2015-09-14 22:27:48 -07: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
Anna Gringauze
4328354581
Merge pull request #1 from neilmacintosh/dev/annagrin/strided_array_view_bugfixes
...
Added support for all compiler and platform targets.
2015-09-14 18:13:10 -07:00
Neil MacIntosh
54ec02fef6
Fixing misformatting of ArrayViewComparison.
2015-09-14 18:04:40 -07:00
Neil MacIntosh
3ff9b17a9f
Restoring empty_array_view tests.
2015-09-14 17:57:29 -07:00
Neil MacIntosh
c6a2f8c086
Testing tab fixup.
2015-09-14 17:51:31 -07:00