Torch on GCC 6.2 (Fedora 24)
It is possible, you just have to set some environmental variables.
And then we can install…
git clone https://github.com/torch/distro.git ~/.torch --recursive
I ended up putting these in .bashrc so they would be used for anything I was compiling. It is more likely that something needing a newer spec will pass -std=c++14 to GCC than something old passing -std=c++98. I am not a big fan of GCC's decision to switch to the newer spec by default, especially since they must know this would break stuff.
Also, if you run into an error from a CUDA header saying you're using an unsupported compiler, just go to that header's line and delete the line that is throwing the error. It will work fine. NVIDIA is just being pedantic for the sake of support.