Giter Site home page Giter Site logo

Comments (1)

andrewdavidsmith avatar andrewdavidsmith commented on August 17, 2024

@cb4github I think the C++ standard included with gcc 8.5.0 does not include all of C++17. I made a conda env and got the most recent build they have of gxx 8.5.0 and this is what I found:

(gcc_eight_point_five_2) [18:09][ build (master*)]$ cat testgpp85.cpp
#include <iostream>
#include <numeric>
#include <vector>

int main(int argc, char *argv[]) {

  std::vector<double> x = {0.0, 1.0, 3.0, 10};

  std::inclusive_scan(begin(x), end(x), begin(x));

  for (auto i: x)
    std::cout << i << std::endl;

  return 0;
}
(gcc_eight_point_five_2) [18:09][ build (master*)]$ g++ --version
g++ (conda-forge gcc 8.5.0-19) 8.5.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(gcc_eight_point_five_2) [18:09][ build (master*)]$ g++ -std=c++17 -o testgpp85 testgpp85.cpp
testgpp85.cpp: In function 'int main(int, char**)':
testgpp85.cpp:9:8: error: 'inclusive_scan' is not a member of 'std'
   std::inclusive_scan(begin(x), end(x), begin(x));
        ^~~~~~~~~~~~~~
(gcc_eight_point_five_2) [18:09][ build (master*)]$ g++-11 -std=c++17 -o testgpp85 testgpp85.cpp
(gcc_eight_point_five_2) [18:09][ build (master*)]$ ./testgpp85 
0
1
4
14
(gcc_eight_point_five_2) [18:09][ build (master*)]$ 

Also, after seeing complaints about these in some old mailing lists, I checked the source for the numeric header between gcc 8.5 and gcc 9.5:

[18:18][garage]$ ls -lh gcc-8.5.0/libstdc++-v3/include/std/numeric 
-rw-rw-r-- 1 andrewds andrewds 5.4K May 14  2021 gcc-8.5.0/libstdc++-v3/include/std/numeric
[18:19][garage]$ ls -lh gcc-9.5.0/libstdc++-v3/include/std/numeric 
-rw-r--r-- 1 andrewds andrewds 25K May 27  2022 gcc-9.5.0/libstdc++-v3/include/std/numeric
[18:19][Garage]$ grep -c inclusive_scan gcc-8.5.0/libstdc++-v3/include/std/numeric 
0
[18:19][garage]$ grep -c inclusive_scan gcc-9.5.0/libstdc++-v3/include/std/numeric 
8
[18:19][garage]$ 

The std::inclusive_scan function isn't the only thing that seems off in gcc 8.5.0, so I'm not sure I should change any sources to support it. I'll close this issue, as it pertains specifically to gcc 8.5.0. Please feel free to open another issue if you encounter a different problem. If you want to discuss how to get dnmtools working for you, please feel free to contact me directly. Thanks again for submitting the issue @cb4github -- it helps!

from dnmtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.