Skip to content

Test: Clarify "non-standard extension" #6037

@frederick-vs-ja

Description

@frederick-vs-ja

We're currently saying "non-standard extension" in several test files.

if constexpr (is_convertible_v<void (*)(int), void*>) { // Test void (*)(int) => void* (non-standard extension)

if constexpr (is_convertible_v<void (*)(int), void*>) { // Test void (*)(int) == void* (non-standard extension)

// Converting from function pointers to void pointers is a non-standard extension

// Converting from function pointers to void pointers is a non-standard extension

// basic_string_view::_Copy_s() is a non-Standard extension that's unconditionally checked.

This is seemingly redundant, because every extension can hardly to be considered "standard extension". Perhaps it would be clearer to say "non-conforming/conformant" extension.

  • For conversion from function pointers to void*, I believe this extension is non-conforming. As [conv.ptr]/2 only allows implicit conversion from pointer to object types to cv void*.
  • For basic_string_view::_Copy_s(), I believe this extension is conforming because it's under an _Ugly name, and we can just say "an extension".

There're also comments in <yvals_core.h> saying "non-Standard extension(s)". But as they refer to removed deprecation messages, I think we shouldn't modify them.

STL/stl/inc/yvals_core.h

Lines 1463 to 1468 in 3f76681

// STL4043 was "stdext::checked_array_iterator, stdext::unchecked_array_iterator,
// and related factory functions are non-Standard extensions and will be removed"
// STL4044 was "The contents of the stdext::cvt namespace are non-Standard extensions and will be removed"
// STL4045 was "The ipfx(), isfx(), opfx(), and osfx() functions are [...] non-Standard extensions"

// STL4048 was "locale::empty() is a non-Standard extension and will be removed in the future."


It seems to be a good first issue Good for newcomers to improve the comments in these test files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationRelated to documentation or comments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions