[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Jonathan Wakely --- Fixed for 7.2
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 --- Comment #5 from Jonathan Wakely --- Author: redi Date: Tue Jun 27 16:23:46 2017 New Revision: 249698 URL: https://gcc.gnu.org/viewcvs?rev=249698=gcc=rev Log: PR libstdc++/81221 fix namespace qualification for parallel mode PR libstdc++/81221 * include/bits/stl_algo.h (sample): Qualify with _GLIBCXX_STD_A not std. * testsuite/25_algorithms/sample/81221.cc: New. Added: branches/gcc-7-branch/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc Modified: branches/gcc-7-branch/libstdc++-v3/ChangeLog branches/gcc-7-branch/libstdc++-v3/include/bits/stl_algo.h
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Tue Jun 27 16:19:16 2017 New Revision: 249697 URL: https://gcc.gnu.org/viewcvs?rev=249697=gcc=rev Log: PR libstdc++/81221 only run new test for check-parallel PR libstdc++/81221 * testsuite/25_algorithms/sample/81221.cc: Disable except for check-parallel. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 --- Comment #3 from Jonathan Wakely --- Author: redi Date: Tue Jun 27 14:44:50 2017 New Revision: 249692 URL: https://gcc.gnu.org/viewcvs?rev=249692=gcc=rev Log: PR libstdc++/81221 fix namespace qualification for parallel mode PR libstdc++/81221 * include/bits/stl_algo.h (sample): Qualify with _GLIBCXX_STD_A not std. * testsuite/25_algorithms/sample/81221.cc: New. Added: trunk/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/stl_algo.h
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 --- Comment #2 from Jeff Hammond --- Thank you! Indeed, that fixes it, both when applied directly to the installed header and when integrated into a build of the latest version. $ g++-8 -std=gnu++17 -g -O3 -mtune=native -D_GLIBCXX_PARALLEL -fopenmp test.cc&& echo "SUCCESS" || echo "FAIL" SUCCESS $ g++-8 -v Using built-in specs. COLLECT_GCC=g++-8 COLLECT_LTO_WRAPPER=/opt/gcc/HEAD/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /opt/gcc//git/configure --program-suffix=-8 --disable-multilib --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++,fortran --with-tune=native --enable-bootstrap --enable-lto --enable-gold=yes --enable-ld=yes --prefix=/opt/gcc//HEAD : (reconfigured) /opt/gcc//git/configure --program-suffix=-8 --disable-multilib --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++,fortran --with-tune=native --enable-bootstrap --enable-lto --enable-gold=yes --enable-ld=yes --prefix=/opt/gcc//HEAD Thread model: posix gcc version 8.0.0 20170627 (experimental) (GCC)
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Target Milestone|--- |7.2 --- Comment #1 from Jonathan Wakely --- This should fix it: --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -5831,8 +5831,9 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO "sample size must be an integer type"); typename iterator_traits<_PopulationIterator>::difference_type __d = __n; - return std::__sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, - __d, std::forward<_UniformRandomBitGenerator>(__g)); + return _GLIBCXX_STD_A:: + __sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, __d, +std::forward<_UniformRandomBitGenerator>(__g)); } #endif // C++17 #endif // C++14
[Bug libstdc++/81221] [7/8 Regression] stl_algo.h: error: ‘__sample’ is not a member of ‘std’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81221 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-27 Ever confirmed|0 |1