mirror of
https://github.com/microsoft/GSL
synced 2026-08-26 04:23:04 -04:00
Update return by value threshold in gsl::not_null (#1205)
- Allow returning by value for types that are not greater than two pointers in size
This commit is contained in:
parent
3325bbd33d
commit
466e4ebaa5
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ namespace details
|
|||
// Copied from cppfront's implementation of the CppCoreGuidelines F.16 (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-in)
|
||||
template<typename T>
|
||||
using value_or_reference_return_t = std::conditional_t<
|
||||
sizeof(T) < 2*sizeof(void*) && std::is_trivially_copy_constructible<T>::value,
|
||||
sizeof(T) <= 2*sizeof(void*) && std::is_trivially_copy_constructible<T>::value,
|
||||
const T,
|
||||
const T&>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue