Skip to content

[libc++] Fix usage of 'exclude_from_explicit_instantiation' attribute on local class members #89377

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

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions libcxx/include/__memory/uses_allocator_construction.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,18 @@ __uses_allocator_construction_args(const _Alloc& __alloc, _Type&& __value) noexc
struct __pair_constructor {
using _PairMutable = remove_cv_t<_Pair>;

_LIBCPP_HIDE_FROM_ABI constexpr auto __do_construct(const _PairMutable& __pair) const {
_LIBCPP_HIDDEN constexpr auto __do_construct(const _PairMutable& __pair) const {
return std::__make_obj_using_allocator<_PairMutable>(__alloc_, __pair);
}

_LIBCPP_HIDE_FROM_ABI constexpr auto __do_construct(_PairMutable&& __pair) const {
_LIBCPP_HIDDEN constexpr auto __do_construct(_PairMutable&& __pair) const {
return std::__make_obj_using_allocator<_PairMutable>(__alloc_, std::move(__pair));
}

const _Alloc& __alloc_;
_Type& __value_;

_LIBCPP_HIDE_FROM_ABI constexpr operator _PairMutable() const {
return __do_construct(std::forward<_Type>(this->__value_));
}
_LIBCPP_HIDDEN constexpr operator _PairMutable() const { return __do_construct(std::forward<_Type>(__value_)); }
};

return std::make_tuple(__pair_constructor{__alloc, __value});
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,8 @@ protected:
__a.__value = std::forward<_Arg>(__arg);
} else {
struct {
_LIBCPP_HIDE_FROM_ABI void operator()(true_type) const { __this->__emplace<_Ip>(std::forward<_Arg>(__arg)); }
_LIBCPP_HIDE_FROM_ABI void operator()(false_type) const {
_LIBCPP_HIDDEN void operator()(true_type) const { __this->__emplace<_Ip>(std::forward<_Arg>(__arg)); }
_LIBCPP_HIDDEN void operator()(false_type) const {
__this->__emplace<_Ip>(_Tp(std::forward<_Arg>(__arg)));
}
__assignment* __this;
Expand Down