Closed Bug 1738107 Opened 3 years ago Closed 3 years ago

Build warning nsTArray.h:3171:19 [-Wdeprecated-declarations] 'iterator<std::output_iterator_tag, void, void, void, void>' is deprecated

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- affected

People

(Reporter: mstange, Assigned: bradwerth)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I'm seeing the following build warning many times over, when building on macOS with the macOS 12 SDK and clang 13:

18:49.13 /Users/mstange/code/obj-m-opt/dist/include/nsTArray.h:3171:19: warning: 'iterator<std::output_iterator_tag, void, void, void, void>' is deprecated [-Wdeprecated-declarations]
18:49.13     : public std::iterator<std::output_iterator_tag, void, void, void, void> {
18:49.13                   ^
18:49.13 /Users/mstange/.mozbuild/clang/bin/../include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::output_iterator_tag, void, void, void, void>' has been explicitly marked deprecated here
18:49.13 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
18:49.13                             ^
18:49.13 /Users/mstange/.mozbuild/clang/bin/../include/c++/v1/__config:1016:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
18:49.14 #  define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
18:49.14                                       ^
18:49.14 /Users/mstange/.mozbuild/clang/bin/../include/c++/v1/__config:993:48: note: expanded from macro '_LIBCPP_DEPRECATED'
18:49.14 #    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
18:49.14                                                ^
18:49.14 1 warning generated.

Also happens for me when building with the default sdk.

Looks like std::iterator is marked as deprecated and we need to mark up our iterator classes that derive from it.

See Also: → 1715800
Assignee: nobody → bwerth
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be058482842c
Part 1: Remove deprecated std::iterator from nsTArrayBackInserter. r=nika
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Attachment #9249137 [details] is not published yet.

Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3a804fa919f3
Part 2: Remove deprecated std::iterator from ICU4CGlue. r=gregtatum
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: