Skip to content

Import std::dynamic_extent into nonstd when selecting std::span #81

@wendazhou

Description

@wendazhou

The <span> header not only contains the std::span type, but also the std::dynamic_extent constant. This constant is present and accessible as nonstd::dynamic_extent when using the span-lite implementation, but disappears from the namespace if the std::span implementation is selected.

To avoid this, it would be great to import std::dynamic_extent into the nonstd namespace if using std::span, i.e.

#if span_USES_STD_SPAN

#include <span>

namespace nonstd {

using std::span;
using std::dynamic_extent; // Add this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions