[konsole] [Bug 432639] Konsole needs gcc > 8.3 (fully supporting C++17) for for_each_n function

2021-02-08 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=432639

--- Comment #1 from tcanabr...@kde.org ---
can you provide a patch?
c++17 is 4 years old and I don't really like to fix compiler bugs, even
though I know that gcc 8.4 was released just last year and that's not a lot
of time for linux  distros to pick it up.


On Mon, Feb 8, 2021 at 12:48 PM  wrote:

> https://bugs.kde.org/show_bug.cgi?id=432639
>
> Bug ID: 432639
>Summary: Konsole needs gcc > 8.3 (fully supporting C++17) for
> for_each_n function
>Product: konsole
>Version: master
>   Platform: Compiled Sources
> OS: Linux
> Status: REPORTED
>   Severity: normal
>   Priority: NOR
>  Component: general
>   Assignee: konsole-de...@kde.org
>   Reporter: rcorrei...@gmail.com
>   Target Milestone: ---
>
> SUMMARY
> By default CentOS 8.3 uses gcc 8.3.1.
> Konsole from master now fails due to this error:
> /media/MyPassport/git/konsole/src/Screen.cpp: In function 'void
> toDebug(const
> Konsole::Character*, int, bool)':
> /media/MyPassport/git/konsole/src/Screen.cpp:394:10: error: 'for_each_n'
> is not
> a member of 'std'
>  std::for_each_n(s, count, [&out](const Character &i) { out +=
> i.character;
> });
>   ^~
> /media/MyPassport/git/konsole/src/Screen.cpp:394:10: note: suggested
> alternative: 'for_each'
>  std::for_each_n(s, count, [&out](const Character &i) { out +=
> i.character;
> });
>   ^~
>   for_each
>
> To be able to compile, another tool chain fully supporting C++17 must be
> installed and enabled: dnf install gcc-toolset-10-toolchain (or
> gcc-toolset-9-toolchain).
> Then all compiles well.
> This is the first time this requirement appears for KDE from what I can
> tell.
>
> A link about that: https://github.com/VcDevel/Vc/issues/182
>
> Even if this is easily fixed with a newer toolchain, it will cause some
> questions.
>
> STEPS TO REPRODUCE
> 1. cmake
> 2. make
>
> OBSERVED RESULT
> Compilation error:
> /git/konsole/src/Screen.cpp:394:10: error: 'for_each_n' is not a member of
> 'std'
> /git/konsole/src/Screen.cpp:394:10: note: suggested alternative: 'for_each'
>
> EXPECTED RESULT
> Change to a source code allowing a successful compilation with gcc 8.3.x
> or add
> a cmake check explaining this new requirement (dnf install
> gcc-toolset-10-toolchain or dnf install gcc-toolset-9-toolchain).
>
> SOFTWARE/OS VERSIONS
> KDE Plasma Version: 5.20.2
> KDE Frameworks Version: 5.76.0
> Qt Version: 5.15.1
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 432639] Konsole needs gcc > 8.3 (fully supporting C++17) for for_each_n function

2021-02-17 Thread Kurt Hindenburg
https://bugs.kde.org/show_bug.cgi?id=432639

Kurt Hindenburg  changed:

   What|Removed |Added

 CC||leszek.les...@web.de

--- Comment #2 from Kurt Hindenburg  ---
*** Bug 433043 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 432639] Konsole needs gcc > 8.3 (fully supporting C++17) for for_each_n function

2021-02-17 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=432639

--- Comment #3 from rcorrei...@gmail.com ---
API for_each is well compiled by gcc 8.3.1

I am not familiar with C++ development but from what I see from for_each_n and 
for_each specifications, the main difference is the second parameter.

For for_each_n, this is a count whether for for_each it is a last/max value.
So may be:
 std::for_each (s, s+count, [&out](const Character &i) { out += i.character;
});
It compiles but I don't know how to check if it really does what is expected
from this toDebug function.

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 432639] Konsole needs gcc > 8.3 (fully supporting C++17) for for_each_n function

2021-02-18 Thread Kurt Hindenburg
https://bugs.kde.org/show_bug.cgi?id=432639

Kurt Hindenburg  changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/util
   ||ities/konsole/commit/52a9df
   ||577d0b06597a016a623fc9f4c32
   ||cb917f9
 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Kurt Hindenburg  ---
Git commit 52a9df577d0b06597a016a623fc9f4c32cb917f9 by Kurt Hindenburg.
Committed on 19/02/2021 at 02:23.
Pushed by hindenburg into branch 'master'.

Comment out auxiliar functions to test Screen

for_each_n() doesn't compile w/ gcc 8.3.x

M  +5-2src/Screen.cpp

https://invent.kde.org/utilities/konsole/commit/52a9df577d0b06597a016a623fc9f4c32cb917f9

-- 
You are receiving this mail because:
You are watching all bug changes.