mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-28 18:41:57 -05:00
Mark dynamic_extent as inline, compiler-version-permitting
This commit is contained in:
parent
be0a8a2caa
commit
4c6f7b2923
@ -41,7 +41,7 @@ namespace gsl
|
||||
{
|
||||
|
||||
// [span.views.constants], constants
|
||||
inline 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>
|
||||
class span;
|
||||
|
@ -45,6 +45,12 @@
|
||||
#define GSL_NODISCARD
|
||||
#endif // defined(__cplusplus) && (__cplusplus >= 201703L)
|
||||
|
||||
#if defined(__cpp_inline_variables)
|
||||
#define GSL_INLINE inline
|
||||
#else
|
||||
#define GSL_INLINE
|
||||
#endif
|
||||
|
||||
namespace gsl
|
||||
{
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user