Closed woodwards closed 6 years ago
No problem asking for help. It looks like this is coming from std::decay_t
as a C++14 addition. My guess is that you're compiling with the C++11 standard. The solution may be as simple as changing the compiler flag to use a more recent version of C++.
Compiler flags look like: -std=c++14
or -std=c++17
Thanks Stephen! I've included the -std=c++14
compiler flag as per
https://stackoverflow.com/questions/31171979/enabling-std-c14-flag-in-codeblocks
and it did make a difference. Now I get only one error:
||=== Build: Debug in lorenz_ascent (compiler: GNU GCC Compiler) ===|
C:\Users\WoodwardS\Documents\Cpp\lorenz_ascent\main.cpp||In function 'int main()':|
C:\Users\WoodwardS\Documents\Cpp\lorenz_ascent\main.cpp|46|error: use of deleted function 'asc::RecorderT<T, block_size>::RecorderT() [with T = double; unsigned int block_size = 4096u]'|
C:\ascent\ascent\Recorder.h|44|note: 'asc::RecorderT<T, block_size>::RecorderT() noexcept [with T = double; unsigned int block_size = 4096u]' is implicitly deleted because its exception-specification does not match the implicit exception-specification 'noexcept (<uninstantiated>)'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Okay, I tested this in Compiler Explorer and found that I get the error you are seeing if I use a version of the GCC Compiler before 5.1
5.1 and beyond compiles, while 4.9.4 and below gives the error.
Are you able to use a more recent compiler?
I could remove the noexcept qualifier on the RecorderT constructor and this would fix the problem. But, I'd want to look into whether this error really makes sense.
I am using the the version of gcc (4.9.3) that comes with RTools, which is something I use quite a bit. I'm a bit nervous about breaking RTools if I update gcc.
https://cran.r-project.org/bin/windows/Rtools/
Apparently it is possible to install two versions of gcc but it looks a little fiddly.
https://gcc.gnu.org/faq.html#multiple
Any suggestions?
I decided I'm fine with removing the explicit noexcept
qualifier. I just committed this change, so if you update your Ascent repository the code should build with GCC 4.9.1 and beyond.
Excellent, it works!!!
Fantastic! I'm closing this issue, but feel free to bring up any issues or questions you have in the future.
Sorry to bother you. I am trying to get the
lorenz
example working. I am using the CodeBlocks IDE with GNU GCC. I have downloaded Ascent and put it inC:\ascent
. I am not using the makefileCMakeLists.txt
, CodeBlocks should handle this automatically I think.When I build I get the following errors:
(I am very new to C++ so please forgive my ignorance.)