Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wendazhou opened this issue Feb 14, 2023 · 0 comments
Closed

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

wendazhou opened this issue Feb 14, 2023 · 0 comments

Comments

@wendazhou
Copy link

wendazhou commented Feb 14, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants