mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Resolve MSVC warning C5260 (#1049)
* Test solution * Mark dynamic_extent as inline, compiler-version-permitting
This commit is contained in:
parent
d9fc52e20e
commit
330583f478
@ -41,7 +41,7 @@ namespace gsl
|
|||||||
{
|
{
|
||||||
|
|
||||||
// [span.views.constants], constants
|
// [span.views.constants], constants
|
||||||
constexpr const std::size_t dynamic_extent = narrow_cast<std::size_t>(-1);
|
GSL_INLINE constexpr const std::size_t dynamic_extent = narrow_cast<std::size_t>(-1);
|
||||||
|
|
||||||
template <class ElementType, std::size_t Extent = dynamic_extent>
|
template <class ElementType, std::size_t Extent = dynamic_extent>
|
||||||
class span;
|
class span;
|
||||||
|
@ -45,6 +45,12 @@
|
|||||||
#define GSL_NODISCARD
|
#define GSL_NODISCARD
|
||||||
#endif // defined(__cplusplus) && (__cplusplus >= 201703L)
|
#endif // defined(__cplusplus) && (__cplusplus >= 201703L)
|
||||||
|
|
||||||
|
#if defined(__cpp_inline_variables)
|
||||||
|
#define GSL_INLINE inline
|
||||||
|
#else
|
||||||
|
#define GSL_INLINE
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace gsl
|
namespace gsl
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user