Samuel García Salas
fcdff2f205
Add static_pointer_cast
...
The current implementation of gsl::not_null provides a constructor to
convert from not_null<U> to not_null<T> when there exists an implicit
conversion from U to T.
However it does not provide an easy way to convert from not_null<U> to
not_null<T> when the conversion from U to T requires the use of
static_cast.
Manually, one would have to do:
auto converted = gsl::not_null<T>(static_cast<T>(original.get()))
In accordance with the STL naming conventions, I propose the function
"gsl::static_pointer_cast(gsl::not_null<U> const &)" to do the job. Until
the GSL gets merged with the STL, it would lie on the ::gsl namespace,
instead of being on ::std along with
static_pointer_cast(std::shared_ptr<U> const &).
Note 1: We could add noexcept if not_null's constructor were noexcept.
Note 2: dynamic_pointer_cast should not be implemented, since dynamic_cast
can return nullptr.
2015-11-14 03:05:59 +01:00
Samuel García
70e735b911
Merge pull request #2 from Microsoft/master
...
Updating the fork
2015-11-13 19:33:02 +01:00
Neil MacIntosh
dc25994ed7
Merge pull request #185 from Microsoft/dev/neilmac/fix-buildscript
...
Update compile options to use older CMake syntax
2015-11-12 19:42:07 -08:00
Neil MacIntosh
b9565e50ce
Update CMakeLists.txt
2015-11-12 19:36:34 -08:00
Neil MacIntosh
ee731055da
Merge pull request #184 from neilmacintosh/dev/neilmac/warnings
...
Turning on max warning levels for compilation.
2015-11-12 19:35:36 -08:00
Neil MacIntosh
fa056f67e8
Enabled -Wall for gcc and clang.
2015-11-13 03:27:53 +00:00
Neil MacIntosh
a998a9b33b
Turned on Level 3 warnings for MSVC.
2015-11-12 18:57:23 -08:00
Neil MacIntosh
42a7030052
Merge pull request #180 from OlafvdSpek/patch-1
...
Sort includes
2015-11-12 15:42:50 -08:00
Neil MacIntosh
d7832acd70
Merge pull request #179 from vladon/master
...
Added default copy assignment operators for helper types.
2015-11-12 09:05:00 -08:00
Olaf van der Spek
550361cf46
Sort includes
2015-11-12 10:23:56 +01:00
Vladislav Yaroslavlev
a29ed61a48
Merge remote-tracking branch 'refs/remotes/Microsoft/master'
2015-11-12 10:47:49 +03:00
Vladislav Yaroslavlev
995cfdf1cb
Add copy assignment operator to BoundsRanges
...
`BoundsRanges` defines copy constructor, but lacks `=` operator
2015-11-12 10:46:21 +03:00
Vladislav Yaroslavlev
557e6693b5
Add copy assignment operator to strided_bounds
...
`strided_bounds` defines copy constructor, but lacks copy assignment
operator
2015-11-12 10:44:41 +03:00
Neil MacIntosh
fd5eb72d48
Merge branch 'master' of https://github.com/Microsoft/GSL
2015-11-11 20:50:54 -08:00
Neil MacIntosh
fc289930ee
Cast size_type for string_span ctor from container.
2015-11-11 20:48:42 -08:00
Neil MacIntosh
670ffbeb11
Added note regarding C++14 support requirements.
2015-11-11 10:37:43 -08:00
Vladislav Yaroslavlev
2b2adebde5
Merge remote-tracking branch 'refs/remotes/Microsoft/master'
2015-11-10 11:17:46 +03:00
Neil MacIntosh
76d465a3ce
Merge pull request #170 from rkhlebnikov/missing-inlines
...
added missing inlines for VS2013 workaround
2015-11-05 10:05:30 -08:00
Rostislav Khlebnikov
31dd90ef31
added missing inlines
2015-11-05 17:56:50 +00:00
Neil MacIntosh
16f121774e
Merge pull request #169 from neilmacintosh/dev/neilmac/to-string-test
...
Added workaround for MSVC 2013 compiler bug.
2015-11-05 09:38:23 -08:00
Neil MacIntosh
4e4882bda8
Added workaround for MSVC 2013 compiler bug.
2015-11-05 09:29:30 -08:00
Neil MacIntosh
caabb40440
Rename of array_view/string_view in readme.
...
Knew I'd miss something!
2015-11-04 13:50:57 -08:00
Neil MacIntosh
ffdf97b83d
Merge pull request #166 from neilmacintosh/dev/neilmac/span-rename
...
Renaming array_view and string_view, as per WG21 discussions.
2015-11-04 12:55:57 -08:00
Neil MacIntosh
b63ec949e9
Renaming array_view and string_view, as per WG21 discussions.
2015-11-04 12:42:27 -08:00
Neil MacIntosh
54f832115b
Merge pull request #165 from neilmacintosh/dev/neilmac/indextype
...
Changing index type for array_view
2015-11-04 12:29:31 -08:00
Neil MacIntosh
dbf0d5017c
Reactivated tests disabled during development.
2015-11-04 12:17:41 -08:00
Neil MacIntosh
68064d63fe
Converted all tabs to spaces in array_view.h.
2015-11-03 19:17:11 -08:00
Neil MacIntosh
e9a9602b4f
Fixed compile issues for MSVC 2013.
2015-11-03 18:56:55 -08:00
Neil MacIntosh
41517ff316
Cleaned up size_t use for ranks. Compilation fixes for non-MSVC compilers.
2015-11-04 02:11:49 +00:00
Neil MacIntosh
14d50a6f77
Minor compilation fixes and workarounds.
2015-11-03 12:44:09 -08:00
Neil MacIntosh
16d1e77568
Merge remote-tracking branch 'origin' into dev/neilmac/indextype
2015-11-02 19:01:59 -08:00
Neil MacIntosh
ba3126105b
Merge pull request #163 from archshift/patch-1
...
array_view: explicitly initialize constexpr function variables
2015-11-02 11:53:08 -08:00
Neil MacIntosh
281e36ef3c
Merge pull request #161 from mattnewport/master
...
Fix gsl::ensure_z() to work for const char* strings
2015-11-02 11:51:13 -08:00
archshift
b39571781e
array_view: explicitly initialize constexpr function variables
2015-11-02 11:47:14 -08:00
Neil MacIntosh
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
Matt Newport
0cbdc7036d
Fixed string_view::ensure_z() for const char*.
2015-10-26 18:23:14 -07:00
Matt Newport
ecc2ee5f1e
Merge branch 'Microsoft/master'
2015-10-26 18:20:56 -07:00
Matt Newport
888ef4204e
Merge branch 'master' of https://github.com/Microsoft/GSL.git
2015-10-26 18:20:21 -07:00
Neil MacIntosh
ace9ab9d3b
Building again. Some tests failing.
2015-10-23 19:49:17 -07:00
Neil MacIntosh
74fba29c0f
Merge pull request #158 from kevgs/fix_unused_parameter
...
fix clang warning on unused function parameter
2015-10-21 11:36:58 -07:00
Kosov Eugene
561da1cd00
fix clang warning on unused function parameter
2015-10-21 13:31:00 +03:00
Samuel García
845c846c27
Merge pull request #1 from Microsoft/master
...
Update from original
2015-10-20 10:46:59 +02:00
Matt Newport
f873dde6e7
Merge branch 'Microsoft/master'
2015-10-19 19:04:00 -07:00
Matt Newport
9e9eddcddf
Updated .gitignore
2015-10-19 18:58:26 -07:00
Matt Newport
ea47e04b73
Merge branch 'master' into Microsoft/master
2015-10-19 18:56:46 -07:00
Matt Newport
59cf62652a
Add .gitignore
2015-10-19 18:55:46 -07:00
Neil MacIntosh
2f25ace31f
Merge pull request #154 from annagrin/dev/annagrin/remove_rank1_specialization
...
Removed specializations for Rank=1
2015-10-19 14:45:15 -07:00
Anna Gringauze
1c208b33d0
Removed specializations for Rank=1
2015-10-19 14:19:46 -07:00
Neil MacIntosh
1e36db9695
Merge pull request #147 from samuel3/master
...
std::hash support for gsl::not_null.
2015-10-19 13:20:53 -07:00
Neil MacIntosh
a813d9e58a
Merge pull request #152 from annagrin/dev/annagrin/removed_index_from_initializer_list
...
Replaced index constructor from initializer_list.
2015-10-19 12:51:03 -07:00