[Bug libstdc++/119962] : __maybe_present_t misses initialization

2025-04-28 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119962 --- Comment #4 from 康桓瑋 --- (In reply to Andrew Pinski from comment #2) > https://eel.is/c++draft/range.lazy.split.outer > > > Testcase from godbolt: > ``` > #include > > struct I { > int x; > using difference_type = std::ptrdiff_t; >

[Bug libstdc++/119962] New: : __maybe_present_t misses initialization

2025-04-26 Thread hewillk at gmail dot com via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- It looks like libstdc++'s __maybe_present_t is always missing initialization, which leads to failure to make some constexpr singular iterators: https://godbolt.

[Bug libstdc++/109162] C++23 improvements to std::format

2025-04-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109162 --- Comment #23 from 康桓瑋 --- (In reply to Tomasz Kamiński from comment #22) > > That is highly intentional to fix incorrect formatting when the container > > is a string. See https://cplusplus.github.io/LWG/issue3881 > > I am well aware of thi

[Bug libstdc++/109162] C++23 improvements to std::format

2025-04-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109162 --- Comment #21 from 康桓瑋 --- > Furthermore the standard specifies these formatters as delegating to > formatter, charT>, which in turn > delegates to range_formatter. This patch avoids one level of indirection, > and dependency o

[Bug c++/119907] New: ICE in tsubst_expr, at cp/pt.cc:21973

2025-04-23 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Why is the GCC Bugzilla become so slowly lately??? This is high duplicate of PR 119906: #include #include template struct view { R r; auto foo(R&) -> std::bool_c

[Bug c++/119906] New: error: '' in namespace 'std' does not name a type

2025-04-23 Thread hewillk at gmail dot com via Gcc-bugs
l Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Not sure if there is already a similar duplicate. https://godbolt.org/z/W8sbx3hnn #include #include template struct view { R r

[Bug libstdc++/119861] formatter specialization for map-like range has set_separator/set_brackets

2025-04-18 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119861 --- Comment #1 from 康桓瑋 --- ..which should not: #include struct Map { std::pair* begin(); std::pair* end(); }; template<> constexpr auto std::format_kind = std::range_format::map; int main() { std::formatter fmt; fmt.set_separator("

[Bug libstdc++/119861] New: formatter specialization of formatter for map class scope has set_separator/set_brackets

2025-04-18 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: ---

[Bug libstdc++/119820] Formatting ranges make a subrange via ranges::subrange (__first, __first + __n)

2025-04-15 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119820 --- Comment #1 from 康桓瑋 --- An example I can think of could be: struct I { using difference_type = int; using value_type = char; value_type operator*() const; I& operator++(); I operator++(int); I& operator--(); I operator--(int);

[Bug libstdc++/119820] New: Formatting ranges make a subrange via ranges::subrange (__first, __first + __n)

2025-04-15 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- The format ranges make a subrange via ranges::subrange __sub(__first, __first + __n);, where __n is a size_t

[Bug libstdc++/119752] New: ranges::find does not handle volatile char ranges well

2025-04-12 Thread hewillk at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This is the sibling of PR119748: https://godbolt.org/z/Mv184YGo8 #include int main() { volatile char vc[4] = {'a', 'b', 'c',

[Bug libstdc++/119748] std::string::string(InputIterator, InputIterator) rejects volatile charT* as iterator

2025-04-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119748 --- Comment #1 from 康桓瑋 --- The _S_copy_range(pointer __p, _Rg&& __rg, size_type __n) help committed yesterday also needs to be fixed for the contiguous_range branch.

[Bug libstdc++/111055] [C++23] Implement P1206R7, Conversions from ranges to containers

2025-04-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111055 --- Comment #26 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #25) > If we can't use range-based 'for' with ranges then we've taken a wrong turn > somewhere. > > I did test them in e.g. std/ranges/access/begin.cc so we know that > rang

[Bug libstdc++/111055] [C++23] Implement P1206R7, Conversions from ranges to containers

2025-04-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111055 --- Comment #24 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #22) > but they deserve to break. I agree with that.

[Bug libstdc++/111055] [C++23] Implement P1206R7, Conversions from ranges to containers

2025-04-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111055 --- Comment #21 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #20) > Does it matter? By design, ranges::begin does the same things as range-based > for (handles arrays first, then looks for member begin(), then looks for ADL > begin).

[Bug libstdc++/111055] [C++23] Implement P1206R7, Conversions from ranges to containers

2025-04-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111055 --- Comment #19 from 康桓瑋 --- (In reply to GCC Commits from comment #18) > The master branch has been updated by Jonathan Wakely : > > https://gcc.gnu.org/g:882d3b319dbf50ae64080731a1398031c100b7c7 > > commit r15-9378-g882d3b319dbf50ae64080731a

[Bug libstdc++/119721] New: tuple<> cannot be compared with array

2025-04-10 Thread hewillk at gmail dot com via Gcc-bugs
ibstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- The following should be well-formed since C++23. #include #include int main() { std::array a; std::tuple<> t; auto eq = (t == a); auto cmp = (t <

[Bug libstdc++/119620] flat_set::emplace is constrained, and always constructs element on the stack

2025-04-04 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119620 --- Comment #5 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #1) > (In reply to 康桓瑋 from comment #0) > > I don't know why the standard sometimes constrains emplace(), sometimes only > > constrains insert(), and sometimes constrains neit

[Bug libstdc++/119620] New: flat_set::emplace is constrained

2025-04-03 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This might be seen as *asking for trouble* bug report: Currently, in libstdc++, flat_set::emplace requires is_constructible_v, which is not required by the standard. https

[Bug libstdc++/101587] ranges::uninitialized_copy/move incorrectly uses std::min

2025-04-01 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101587 --- Comment #11 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #10) > (In reply to 康桓瑋 from comment #9) > > Still need casting the return difference type from __mindist, I think? > > Ah yes, we need to cast it back to the type of the fi

[Bug libstdc++/119545] New: tuple::operator==()'s help lambda does not specify return type as bool

2025-03-30 Thread hewillk at gmail dot com via Gcc-bugs
ormal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include struct Boolean { Boolean(Boolean&&) = delete; operator bool() const; }; struct Object {

[Bug c++/119516] New: SIGKILL when -O2

2025-03-28 Thread hewillk at gmail dot com via Gcc-bugs
: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- The following code produces: Killed - processing time exceeded Program terminated with signal: SIGKILL Compiler returned: 143 when using -O2. #include #include #include #include #include #include

[Bug libstdc++/101587] ranges::uninitialized_copy/move incorrectly uses std::min

2025-03-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101587 --- Comment #9 from 康桓瑋 --- (In reply to GCC Commits from comment #8) > The master branch has been updated by Jonathan Wakely : > > https://gcc.gnu.org/g:f4b6acfc36fb1f72fdd5bf4da208515e6495a062 > > commit r15-8980-gf4b6acfc36fb1f72fdd5bf4da20

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2025-03-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #20 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #19) > We could do this, and rely on the fact that the number of aliases is always > small so that we can claim it's O(1): > > --- a/libstdc++-v3/include/std/text_encoding >

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2025-03-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #18 from 康桓瑋 --- > The random-access-non-sized ranges in the standard are currently only > infinite ranges such as views::iota(0). Random access is useful for these > ranges because we can random access any place without worrying abo

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2025-03-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #17 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #15) > (In reply to 康桓瑋 from comment #13) > > I'm not sure it's reasonable or trivial for alias_view to be sized_range, > > I don't think it is necessary. Is there a use cas

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2025-03-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #13 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #12) > Implementation-defined means the implementation must define it (and document > it). > > If the implementation says the types are different, then they're different, >

[Bug libstdc++/119415] flat_set::insert_range may not handle C++20 common-range

2025-03-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415 --- Comment #14 from 康桓瑋 --- I believe the correct way should be: else if constexpr (ranges::common_range<_Rg> && requires { requires derived_from>::iterator_category,

[Bug libstdc++/119415] flat_set::insert_range may not handle C++20 common-range

2025-03-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415 --- Comment #13 from 康桓瑋 --- (In reply to Tomasz Kamiński from comment #12) > I have realized that with the resolution of the > https://cplusplus.github.io/LWG/lwg-defects.html#3749, you can run into this > problem by doing: > > auto r = std::v

[Bug libstdc++/119415] flat_set::insert_range may not handle C++20 common-range

2025-03-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415 --- Comment #11 from 康桓瑋 --- > Use __cpp17_input_iterator can still produce hard errors in some edge cases. With "hard errors", I mean the following: struct I { using difference_type = int; using value_type = int; int operator*() const;

[Bug libstdc++/119415] flat_set::insert_range may not handle C++20 common-range

2025-03-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415 --- Comment #10 from 康桓瑋 --- (In reply to Tomasz Kamiński from comment #9) > > Hum, meeting Cpp17LegacyIterator requirements does not mean it is a C++17 > > input iterator, only iterator_traits::iterator_category represents its > > category, s

[Bug libstdc++/119415] flat_set::insert_range may not handle C++20 common-range

2025-03-25 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415 --- Comment #8 from 康桓瑋 --- (In reply to GCC Commits from comment #6) > The master branch has been updated by Tomasz Kaminski : > > https://gcc.gnu.org/g:4d1b19695669e6c67b9c3df07673bc22cae3a662 > > commit r15-8879-g4d1b19695669e6c67b9c3df0767

[Bug libstdc++/119415] flat_set::insert_range may not handle C++20 common-range

2025-03-24 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415 --- Comment #5 from 康桓瑋 --- (In reply to Tomasz Kamiński from comment #4) > If want to support user-defined containers, I think we should check if > iterator_traits::iterator category exists, before calling > insert(Iterator, Iterator) overload.

[Bug c++/119434] New: template argument 2 is invalid for CTAD

2025-03-23 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- GCC rejects the following valid code: #include #include template struct simd { template constexpr simd(R&&) { } }; template simd(R&& r) -> simd,

[Bug libstdc++/119427] New: std::erase_if(std::flat_map) does not work

2025-03-22 Thread hewillk at gmail dot com via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include int main() { std::flat_map m1, m2; std::erase_if(m1, [](auto) { return true; }); // error } https://godbolt.org/z/P4cTdzo69

[Bug libstdc++/119427] std::erase_if(std::flat_map) does not work

2025-03-22 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119427 --- Comment #2 from 康桓瑋 --- Also, erase_if should not use ranges::remove_if, since that would support member pointers via std::invoke, which the standard currently disallows. This seems like an enhancement, though.

[Bug libstdc++/119427] std::erase_if(std::flat_map) does not work

2025-03-22 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119427 --- Comment #1 from 康桓瑋 --- flat_set has the same issue.

[Bug libstdc++/119415] New: flat_set::insert_range may not handle C++20 common-range

2025-03-21 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Bug 118156 fixes the non-common range issue, and one of the new branches is: else if constexpr (ranges::common_range<_Rg>)

[Bug libstdc++/119358] New: _M_rehash_insert of unordered sets/maps misses casting of difference_type

2025-03-18 Thread hewillk at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This led to a hard error in the following code with -std=gnu++23: auto r = std::views::iota(__int128(0)) | std

[Bug c++/119252] New: g++: internal compiler error: Segmentation fault signal terminated program cc1plus

2025-03-12 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include struct S { bool has_value() const; }; namespace std::ranges { template, iterator_t<_Vp>> _Pr

[Bug libstdc++/119135] New: Typo in as_const range adaptor

2025-03-06 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- /ranges#L9351: else if constexpr (__detail::__is_ref_view<_Tp> && constant_range) return ref_view(static_cast

[Bug libstdc++/115218] The conversion constructor of concat_view::iterator always default-constructs variant

2025-03-05 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115218 --- Comment #9 from 康桓瑋 --- (In reply to Patrick Palka from comment #8) > Fixed, thanks! The fix for LWG 4082 is the missing viewable_range constraint for one pack case.

[Bug libstdc++/119022] ranges::inplace_merge should check for iterator_concept, not iterator_category

2025-02-26 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119022 康桓瑋 changed: What|Removed |Added CC||hewillk at gmail dot com --- Comment #2 from 康桓瑋

[Bug libstdc++/115209] The implementation of concat_view refers to p2542r7 rather than the p2542r8

2025-02-20 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115209 --- Comment #7 from 康桓瑋 --- (In reply to 康桓瑋 from comment #6) > (In reply to Patrick Palka from comment #5) > > (In reply to 康桓瑋 from comment #4) > > > > Our concat_view implementation is accidentally based off of an older > > > > revisi

[Bug libstdc++/115209] The implementation of concat_view refers to p2542r7 rather than the p2542r8

2025-02-20 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115209 --- Comment #6 from 康桓瑋 --- (In reply to Patrick Palka from comment #5) > (In reply to 康桓瑋 from comment #4) > > > Our concat_view implementation is accidentally based off of an older > > > revision of the paper, P2542R7 instead of R8. A

[Bug libstdc++/115209] The implementation of concat_view refers to p2542r7 rather than the p2542r8

2025-02-19 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115209 --- Comment #4 from 康桓瑋 --- > Our concat_view implementation is accidentally based off of an older > revision of the paper, P2542R7 instead of R8. As far as I can tell the > only semantic change in the final revision is the relaxed

[Bug libstdc++/115218] The conversion constructor of concat_view::iterator always default-constructs variant

2025-02-18 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115218 --- Comment #2 from 康桓瑋 --- (In reply to Patrick Palka from comment #1) > Does this also mean the iterator's default ctor needs a > default_initializable<_Vs...[0]> constraint? The variant constructor already has such a constraint.

[Bug libstdc++/118156] New: flat_set::insert_range cannot handle non-common ranges

2024-12-20 Thread hewillk at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include #include int main() { std::flat_set m; m.insert_range(std::views::iota(0) | std::views::take(5)); } https://godbolt.org/z/Wzah6Ms67

[Bug libstdc++/118083] New: __possibly_const_range misses input_range constraint

2024-12-17 Thread hewillk at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- possibly-const-range requires that the template parameter R satisfy input_range, which libstdc++ misses, which leads to the following hard error: #include struct

[Bug libstdc++/118022] New: : _Copy_awaiter should explicitly construct _Yielded_decvref

2024-12-12 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- auto yield_value(const _Yielded_deref& __val) noexcept (is_nothrow_constructible_v<_Yielded_

[Bug c++/118020] New: SIGSEGV in std::generator

2024-12-12 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- The following gives: Program terminated with signal: SIGSEGV, not sure what happens, so let me assume for now that this is a bug (either in the language or in the library). #include std

[Bug libstdc++/117998] New: : views::counted misses difference casting for contiguous_iterator case

2024-12-11 Thread hewillk at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- template constexpr auto operator() [[nodiscard]] (_Iter __i, iter_difference_t<_Iter> __n)

[Bug c++/117873] New: Spurious -Wmaybe-uninitialized warnings with -O3 for static const std::regex

2024-12-01 Thread hewillk at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- https://godbolt.org/z/Mh64vqGcs #include int main() { static const std::regex rgx{"hello"}; } compil

[Bug libstdc++/111861] ranges::min/max should not use `auto __result = *__first;`

2024-11-13 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111861 --- Comment #4 from 康桓瑋 --- (In reply to Patrick Palka from comment #3) > (In reply to 康桓瑋 from comment #2) > > (In reply to Patrick Palka from comment #1) > > > Interesting, I guess 'auto x = *iter;' should never be done in generic > > > code

[Bug libstdc++/117541] New: vector::insert_range should not use ranges::copy

2024-11-11 Thread hewillk at gmail dot com via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Unlike vector::assign_range which requires assignable_from> is true, this means that ranges::copy is not necessarily well-formed for vector::insert_range: #incl

[Bug libstdc++/111861] ranges::min/max should not use `auto __result = *__first;`

2024-11-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111861 --- Comment #2 from 康桓瑋 --- (In reply to Patrick Palka from comment #1) > Interesting, I guess 'auto x = *iter;' should never be done in generic code > then? Yap, even 'range_value_t x = *iter;'.

[Bug libstdc++/117094] New: ranges::fill misses std::move for output_iterator

2024-10-11 Thread hewillk at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- When sized_sentinel_for<_Sent, _Out> is true, ranges::fill dispatches ranges::fill_n(__first, __len, __value) while __first is not guaranteed to be copyable. #i

[Bug libstdc++/115098] std::vector::iterator::reference is default-constructible

2024-08-21 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115098 --- Comment #3 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #2) > (In reply to 康桓瑋 from comment #1) > > std::bitset has similar issues: > > > > #include > > > > std::bitset<1> bitset; > > typename std::bitset<1>::reference bit_ref(b

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2024-08-19 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #10 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #9) > Currently aliases_view is allowed to be a common range, but not required to > be. > > If we specify that its sentinel type is std::default_sentinel, that would > requi

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2024-08-19 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #8 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #7) > "Note that this view is not common_range because it can be implemented more > efficiently > without that requirement, and, being copyable, it can be adapted into one." >

[Bug libstdc++/116399] C++26 text_encoding​::​aliases_view is not default-constructible

2024-08-19 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399 --- Comment #5 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #4) > Thanks! I'll submit an LWG issue to add something saying there's an > unspecified constructor, or just say explicitly that it's not default > constructible. Not sure it

[Bug libstdc++/116399] New: C++26 text_encoding​::​aliases_view is not default-constructible

2024-08-17 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- text.encoding.aliases] indicates that text_encoding::aliases_view is an empty struct, which suggests it is default-constructible

[Bug c++/115914] SIGSEGV when std::generator co_yield different ranges of elements

2024-07-14 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115914 --- Comment #2 from 康桓瑋 --- (In reply to Andrew Pinski from comment #1) > I suspect this is a dup of bug 113460. Definitely.

[Bug c++/115914] New: SIGSEGV when std::generator co_yield different ranges of elements

2024-07-13 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include #include #include #include template auto concat(Rs&&... rs) -> std::generator { (co_yield std::ranges::ele

[Bug libstdc++/115846] std::optional> is constant expression even in C++20 mode

2024-07-09 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115846 --- Comment #8 from 康桓瑋 --- (In reply to 康桓瑋 from comment #7) > (In reply to Jonathan Wakely from comment #6) > > (In reply to Andrew Pinski from comment #1) > > > I think it is due to: > > > include/std/optional: _GLIBCXX20_CONSTEXPR ~_Stor

[Bug libstdc++/115846] std::optional> is constant expression even in C++20 mode

2024-07-09 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115846 --- Comment #7 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #6) > (In reply to Andrew Pinski from comment #1) > > I think it is due to: > > include/std/optional: _GLIBCXX20_CONSTEXPR ~_Storage() { } > > > > Which was done in r12-4

[Bug libstdc++/115846] New: std::optional> is constant expression even in C++20 mode

2024-07-09 Thread hewillk at gmail dot com via Gcc-bugs
mal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include #include // static_assert([] { // std::unique_ptr p; // non-constant condition for static assertion // return t

[Bug libstdc++/115799] ranges::find's optimized branching for memchr is not quite right

2024-07-07 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115799 --- Comment #8 from 康桓瑋 --- (In reply to Jonathan Wakely from comment #7) > Fixed now, thanks for the reports. Thanks for the quick fix. There may be another potential issue that I don't know if it is worth mentioning. When the difference_typ

[Bug c++/115814] New: class template argument deduction failed in C++20

2024-07-06 Thread hewillk at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- template struct overloaded : Ts... { }; // explicit deduction guide (not needed as of C++20) // template // overloaded(Ts...) -> overloaded; int main() { aut

[Bug libstdc++/115799] ranges::find's optimized branching for memchr is not quite right

2024-07-06 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115799 --- Comment #3 from 康桓瑋 --- (In reply to Tamar Christina from comment #2) > I also get an ICE related: > > /opt/buildAgent/temp/buildTmp/toolchain/include/c++/15.0.0/bits/stl_algo.h: > 3873:38: error: no match for 'operator+' (operand types are

[Bug c++/115803] New: ICE: tree check: expected class 'type', have 'constant' (integer_cst) in cp_type_quals, at cp/typeck.cc:11646

2024-07-05 Thread hewillk at gmail dot com via Gcc-bugs
Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include #include auto get_n = [](Tuple&am

[Bug libstdc++/115799] New: ranges::find's optimized branching for memchr is not quite right

2024-07-05 Thread hewillk at gmail dot com via Gcc-bugs
ormal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- ranges_util.h#L505: if constexpr (is_same_v<_Proj, identity>) if constexpr(__can_use_memchr_fo

[Bug c++/115792] GCC accepts [] throw () {}

2024-07-05 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115792 --- Comment #7 from 康桓瑋 --- (In reply to Andrew Pinski from comment #6) > So I looked into the change for clang: > https://github.com/llvm/llvm-project/commit/ > 0620e6f4b76a9725dbd82454d58c5a68a7e47074 > > And they didn't add a testcase for th

[Bug c++/115792] New: GCC accepts [] throw () {}

2024-07-04 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- int main() { auto l = [] throw () {}; l(); } https://godbolt.org/z/GejGeKzjd Other compilers consider it a syntax error. I currently don't know who is right.

[Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778

2024-06-10 Thread hewillk at gmail dot com via Gcc-bugs
Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This seems like 15 regressions and may related to the

[Bug libstdc++/115218] New: The conversion constructor of concat_view::iterator always default-constructs variant

2024-05-24 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- constexpr iterator(iterator __it) requires _Const && (convertible_to, it

[Bug libstdc++/115215] New: views::concat rejects non-movable references

2024-05-24 Thread hewillk at gmail dot com via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- libstdc++'s views::concat always requires concat_view(rs...) to be well-formed which does not fully conform with the wording as R does not need to satisfy concatable

[Bug libstdc++/115209] New: The implementation of concat_view refers to p2542r7 rather than the p2542r8

2024-05-23 Thread hewillk at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- It seems that R8 is the final version. Not sure why libstdc++ refers to R7, which makes some updates of R8 not integrated

[Bug libstdc++/115145] New: Help lambda in rewritten std::variant comparisons does not specify return type

2024-05-17 Thread hewillk at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- ..which can be an regression: #include struct Bool { operator bool(); Bool(const Bool&) = delete; }; st

[Bug libstdc++/115098] std::vector::iterator::reference is default-constructible

2024-05-14 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115098 --- Comment #1 from 康桓瑋 --- std::bitset has similar issues: #include std::bitset<1> bitset; typename std::bitset<1>::reference bit_ref(bitset, 0); // well-formed in libstdc++ https://godbolt.org/z/T4qvv8TcG

[Bug libstdc++/115098] New: std::vector::iterator::reference is default-constructible

2024-05-14 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- ..which shouldn't because [vector.bool.pspc] specifies that its default constructor is private. #include typename std::vector::ite

[Bug c++/115067] New: Bogus -O2 -Wnull-dereference for istreambuf_iterator

2024-05-13 Thread hewillk at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include #include #include std::string fn() { std::istringstream is {"bob"}; auto beg = std::istreambuf_iterator(is); auto end = std::istreambu

[Bug libstdc++/115046] meta-recursion when apply join_view with as_const_view

2024-05-11 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115046 --- Comment #1 from 康桓瑋 --- Oh, maybe this is just because MSVC does not use std::optional but uses _Defaultabox.

[Bug libstdc++/115046] New: meta-recursion when apply join_view with as_const_view

2024-05-11 Thread hewillk at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- I seriously doubt this is a more practical example of LWG 3986 since join_view has a std::optional member to store the iterator, but I'm not sure about wh

[Bug libstdc++/115045] New: views::adjacent_transform<0> is underconstrained

2024-05-11 Thread hewillk at gmail dot com via Gcc-bugs
ponent: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This is related to the PR38. #include int main() { std::views::adjacent_transform<0>(std::views::single(0), []{}); // hard error in libstdc++ }

[Bug c++/115000] New: Confusing 'cannot convert to 'int' in initialization' error message

2024-05-08 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Consider the following: #include struct S { S() = default; S(S&&) = default; }; S s; std::rang

[Bug c++/114934] New: Error message for expected unqualified-id could be improved

2024-05-03 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Suppose I misspelled an extra colon for the namespace (https://godbolt.org/z/q3b7531q3): #include #include using Tuple = std::tuple; GCC

[Bug c++/114845] New: Confusing message when using undeclared identifier of Const

2024-04-24 Thread hewillk at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- https://godbolt.org/z/v6M35zMa4 There is a typo here, I missed an underscore: template requires Const_ struct S; S s; The error message

[Bug libstdc++/103924] views::join combined with std::string cannot be used in constant expressions

2024-03-29 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103924 --- Comment #4 from 康桓瑋 --- (In reply to Patrick Palka from comment #2) > *** Bug 114530 has been marked as a duplicate of this bug. *** That's my lost memory.

[Bug libstdc++/114530] New: accessing 'std::__cxx11::basic_string::::_M_allocated_capacity' member instead of initialized 'std::__cxx11::basic_string::::_M_lo

2024-03-29 Thread hewillk at gmail dot com via Gcc-bugs
; member in constant expression Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target

[Bug libstdc++/114477] The user-defined constructor of filter_view::iterator is not fully compliant with the standard

2024-03-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114477 --- Comment #6 from 康桓瑋 --- (In reply to Jiang An from comment #5) > (In reply to 康桓瑋 from comment #0) > > Since P3059R0 is closed (although I feel bad about this) > > BTW, now I think this is somehow unfortunate. > P3059 behaved like a follow-

[Bug libstdc++/114477] New: The user-defined constructor of filter_view::iterator is not fully compliant with the standard

2024-03-25 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- Since P3059R0 is closed (although I feel bad about this), this suggests that libstdc++ may need to

[Bug c++/113929] New: GCC accepts template

2024-02-15 Thread hewillk at gmail dot com via Gcc-bugs
: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- This is the sibling of Bug 113788. template struct S {} ; S<0> s{}; https://godbolt.org/z/GbdqW9zee Thank you.

[Bug c++/113810] New: A lambda with this auto style that captures this in a member function cannot use this pointer

2024-02-07 Thread hewillk at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- struct S { int i = 42; constexpr auto f() { return [this](this auto) { return this-&g

[Bug c++/113802] New: gcc rejects auto f(this auto self...) { }

2024-02-07 Thread hewillk at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- struct S { auto f(this auto self...) { } }; int main() { S{}.f(); } https://godbolt.org/z/a81WPW65f GCC rejects the above code with: :2:10: error: an explicit object

[Bug c++/113788] New: Deducing this is broken with structured binding

2024-02-06 Thread hewillk at gmail dot com via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- GCC accepts the following: struct S { int a, b; }; int main() { S s = {1, 2}; this auto& [a, b] = s; return b; } Thanks. https://godbolt.org/z/34xTee6sx

[Bug c++/113640] 'deducing this' lambda invoked multiple times unexpectedly

2024-01-28 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113640 --- Comment #1 from 康桓瑋 --- Noted that changing `this auto self` to `this auto&& self` will get the expected results

[Bug c++/113640] New: 'deducing this' lambda invoked multiple times unexpectedly

2024-01-28 Thread hewillk at gmail dot com via Gcc-bugs
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include int main() { auto l = [](this auto self, int n) { std::cout << n << " "; return self

[Bug c++/113629] 'deducing this' does not work with conversion operators

2024-01-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113629 --- Comment #2 from 康桓瑋 --- more reduced: struct Base { operator int(this auto&&) { return 42; } }; int main() { Base b; // return static_cast(Base{}); // ok return static_cast(b); // error } https://godbolt.org/z/qGrbf4rj7

[Bug c++/113629] 'deducing this' does not work with conversion operators

2024-01-27 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113629 --- Comment #1 from 康桓瑋 --- test: https://godbolt.org/z/jdz3ejohv

  1   2   3   4   5   6   >