Closed Bug 1400307 Opened 2 years ago Closed 11 months ago

TypeTraits specializes for char16_t but not char32_t

Categories

(Core :: MFBT, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: tromey, Assigned: tromey)

Details

Attachments

(1 file)

At least one spot in TypeTraits specializes on char16_t but not char32_t.
This seems like an oversight.
Comment on attachment 8908746 [details]
Bug 1400307 - handle char32_t in TypeTraits.h;

https://reviewboard.mozilla.org/r/180378/#review185536
Attachment #8908746 - Flags: review?(nfroyd) → review+
Avoid a warning by using protected: rather than private: in a struct used only for testing.
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eb54dc28dfc7
handle char32_t in TypeTraits.h; r=froydnj
Backed out for Android API 16+ opt bustage at android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2630 (invalid conversion):

https://hg.mozilla.org/integration/autoland/rev/133b69a9a749d18d66d908626b0e8bf9d2f3920a

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=eb54dc28dfc7cb09eec4bd3ac8da13b267d2a639&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=131977473&repo=autoland

[task 2017-09-19T14:15:33.204Z] 14:15:33     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2630:34: error: invalid conversion from 'std::__ndk1::unique_ptr<std::__ndk1::__function::__base<bool(unsigned int, int, int*)>, std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<nsGridContainerFrame::Tracks::DistributeToTrackLimits(nscoord, nsTArray<nsGridContainerFrame::TrackSize>&, nsTArray<unsigned int>&, const nsGridContainerFrame::TrackSizingFunctions&, nscoord)::<lambda(uint32_t, nscoord, nscoord*)>, std::__ndk1::allocator<nsGridContainerFrame::Tracks::DistributeToTrackLimits(nscoord, nsTArray<nsGridContainerFrame::TrackSize>&, nsTArray<unsigned int>&, const nsGridContainerFrame::TrackSizingFunctions&, nscoord)::<lambda(uint32_t, nscoord, nscoord*)> >, bool(unsigned int, int, int*)> > > >::pointer {aka std::__ndk1::__function::__base<bool(unsigned int, int, int*)>*}' to 'std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<nsGridContainerFrame::Tracks::DistributeToTrackLimits(nscoord, nsTArray<nsGridContainerFrame::TrackSize>&, nsTArray<unsigned int>&, const nsGridContainerFrame::TrackSizingFunctions&, nscoord)::<lambda(uint32_t, nscoord, nscoord*)>, std::__ndk1::allocator<nsGridContainerFrame::Tracks::DistributeToTrackLimits(nscoord, nsTArray<nsGridContainerFrame::TrackSize>&, nsTArray<unsigned int>&, const nsGridContainerFrame::TrackSizingFunctions&, nscoord)::<lambda(uint32_t, nscoord, nscoord*)> >, bool(unsigned int, int, int*)> > >::pointer {aka std::__ndk1::__function::__func<nsGridContainerFrame::Tracks::DistributeToTrackLimits(nscoord, nsTArray<nsGridContainerFrame::TrackSize>&, nsTArray<unsigned int>&, const nsGridContainerFrame::TrackSizingFunctions&, nscoord)::<lambda(uint32_t, nscoord, nscoord*)>, std::__ndk1::allocator<nsGridContainerFrame::Tracks::DistributeToTrackLimits(nscoord, nsTArray<nsGridContainerFrame::TrackSize>&, nsTArray<unsigned int>&, const nsGridContainerFrame::TrackSizingFunctions&, nscoord)::<lambda(uint32_t, nscoord, nscoord*)> >, bool(unsigned int, int, int*)>*}' [-fpermissive]
[task 2017-09-19T14:15:33.205Z] 14:15:33     INFO -               __ptr_.second()(__tmp);
[task 2017-09-19T14:15:33.206Z] 14:15:33     INFO -
Flags: needinfo?(ttromey)
Sorry about that.
Flags: needinfo?(ttromey)
(In reply to Tom Tromey :tromey from comment #7)
> Sorry about that.

Assuming that this looks like code totally unrelated to your patch, you've probably hit what seems like some compiler bug. See bug 1408459 and bug 1367798. The work around is to figure out what .cpp file is hitting the error, then make it not be built in unified mode...
Priority: -- → P3
I'm thinking it's probably better to switch (as much as possible) to type_traits instead.

There's no concrete need for this and switching to type_traits would fix it automatically.

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.