diff options
author | Neil MacIntosh <neilmac@fb.com> | 2018-02-11 14:27:05 -0800 |
---|---|---|
committer | Neil MacIntosh <neilmac@fb.com> | 2018-02-11 14:27:05 -0800 |
commit | 533494335b854eb954b9fb9205b37ce628bd7fca (patch) | |
tree | d3f32801936c2da89edda8a15aebd0fb30070dff /include | |
parent | 5538021e76cf3ebfc1138a1c2fbe345fc08dc8c5 (diff) | |
parent | f63fe12ba757d294b94c4517f08301750a29c401 (diff) | |
download | platform_external_Microsoft-GSL-533494335b854eb954b9fb9205b37ce628bd7fca.tar.gz platform_external_Microsoft-GSL-533494335b854eb954b9fb9205b37ce628bd7fca.tar.bz2 platform_external_Microsoft-GSL-533494335b854eb954b9fb9205b37ce628bd7fca.zip |
Merge branch 'master' of https://github.com/neilmacintosh/GSL into remove-move-ops
Diffstat (limited to 'include')
-rw-r--r-- | include/gsl/gsl_assert | 4 | ||||
-rw-r--r-- | include/gsl/string_span | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/gsl/gsl_assert b/include/gsl/gsl_assert index 468d4a0..eeb3473 100644 --- a/include/gsl/gsl_assert +++ b/include/gsl/gsl_assert @@ -52,12 +52,10 @@ // #ifdef _MSC_VER #define GSL_ASSUME(cond) __assume(cond) -#elif defined(__clang__) -#define GSL_ASSUME(cond) __builtin_assume(cond) #elif defined(__GNUC__) #define GSL_ASSUME(cond) ((cond) ? static_cast<void>(0) : __builtin_unreachable()) #else -#define GSL_ASSUME(cond) static_cast<void>(!!(cond)) +#define GSL_ASSUME(cond) static_cast<void>((cond) ? 0 : 0) #endif // diff --git a/include/gsl/string_span b/include/gsl/string_span index eb4c707..cd9ddf9 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -98,7 +98,7 @@ namespace details { if (str == nullptr || n <= 0) return 0; - span<const CharT> str_span{str, n}; + const span<const CharT> str_span{str, n}; std::ptrdiff_t len = 0; while (len < n && str_span[len]) len++; |