mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge branch 'master' of https://github.com/neilmacintosh/GSL into remove-move-ops
This commit is contained in:
commit
533494335b
@ -11,7 +11,7 @@
|
||||
</Type>
|
||||
|
||||
<!-- These types are from the gsl_util header. -->
|
||||
<Type Name="gsl::final_act<*>">
|
||||
<Type Name="gsl::final_action<*>">
|
||||
<DisplayString>{{ invoke = {invoke_}, action = {f_} }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[invoke]">invoke_</Item>
|
||||
|
@ -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
|
||||
|
||||
//
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user