Repository navigation
Fix compilation with C++17 and later - #281
Conversation
|
@andreasnoack, very trivial PR, would you mind reviewing/integrating it? Thanks in advance. |
|
https://github.com/elemental/Elemental/actions/runs/38260879078/job/114897739085 I'm rerunning the failed job. But the following is the likely CI fix: --- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,6 +33,7 @@
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
FC: ${{ matrix.f77 }}
+ UCX_TLS: tcp,self,sm
steps:
- uses: actions/checkout@v4Also claude suggests: --- a/include/El/core/environment/decl.hpp
+++ b/include/El/core/environment/decl.hpp
@@ -37,8 +37,7 @@
using std::exception;
inline bool has_uncaught_exception() noexcept
{
-#if __cplusplus >= 201703L || \
- (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+#ifdef __cpp_lib_uncaught_exceptions
return std::uncaught_exceptions() > 0;
#else
return std::uncaught_exception(); |
so that worked! |
|
I didn't know you had write access here. That simplifies everything. |
|
create a PR with some additional CI changes at #282 |
|
Will apply your suggestions after the other PR is merged. |
9b1f3eb to
96fc476
Compare
|
I've applied your suggestion for |
|
calude is suggesting one more fix, I think good to apply: diff --git a/include/El/core.hpp b/include/El/core.hpp
index 0f89acaed..fde84a01e 100644
--- a/include/El/core.hpp
+++ b/include/El/core.hpp
@@ -20,6 +20,7 @@
#include <cstdlib>
#include <cstring>
#include <ctime>
+#include <exception>
#include <fstream>
#include <functional>
#include <iostream> |
|
Since this is simpler MR (than #282) - I'll go ahead and merge this in (after the above fix, and a successful CI run). |
|
Hm - opencode is suggesting: diff --git a/include/El/core/environment/decl.hpp b/include/El/core/environment/decl.hpp
index c236307e0..e87c46441 100644
--- a/include/El/core/environment/decl.hpp
+++ b/include/El/core/environment/decl.hpp
@@ -9,6 +9,8 @@
#ifndef EL_ENVIRONMENT_DECL_HPP
#define EL_ENVIRONMENT_DECL_HPP
+#include <exception>
+
namespace El {
using std::size_t;
@@ -35,7 +37,7 @@ using std::ostream;
using std::ostringstream;
using std::exception;
-inline bool has_uncaught_exception() noexcept
+inline bool has_uncaught_exception() EL_NO_EXCEPT
{
#ifdef __cpp_lib_uncaught_exceptions
return std::uncaught_exceptions() > 0; |
|
I don't get why we should |
96fc476 to
f386f93
Compare
f386f93 to
c87ec25
Compare
|
Applied Claude suggestion and the OpenCode second suggestion. |
No description provided.