It sounds like your editor is looking ahead and trying to open all the included files! I caught that #include <numbers.h> but I don't have that header file myself. I don't know the details of any release of Ubuntu, but it's possible that a traditional distro like Ubuntu may not have the latest version of gcc or a standard C++ library that provides that. If Zenju could speak to the matter that would be fantastic.
Found it:
https://en.cppreference.com/w/cpp/header/numbers says it is from C++20. My Devuan Ceres doesn't have c++20 standard c++ library yet so I had to revert the code to the previous contents:
diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/zen/legacy_compiler.h 10.24-1/zen/legacy_compiler.h
--- 10.24-0/zen/legacy_compiler.h 2020-05-17 13:44:27.542140458 -0400
+++ 10.24-1/zen/legacy_compiler.h 2020-05-17 14:07:49.115166339 -0400
@@ -7,9 +7,6 @@
#ifndef LEGACY_COMPILER_H_839567308565656789
#define LEGACY_COMPILER_H_839567308565656789
- #include <numbers> //C++20
-
- #include <span> //requires C++20
@@ -21,8 +18,53 @@
//---------------------------------------------------------------------------------
+#if __cpp_lib_span
+ #error get rid of workaround:
+#endif
+
+template <class T>
+class span
+{
+public:
+ template <class Iterator>
+ span(Iterator first, Iterator last) : size_(last - first), data_(first != last ? &*first : nullptr) {}
+
+ template <class Container>
+ span(Container& cont) : span(cont.begin(), cont.end()) {}
+
+ using iterator = T*;
+ using const_iterator = const T*;
+
+ iterator begin() { return data_; }
+ iterator end () { return data_ + size_; }
+
+ const_iterator begin() const { return data_; }
+ const_iterator end () const { return data_ + size_; }
+ const_iterator cbegin() const { return begin(); }
+ const_iterator cend () const { return end (); }
+ T* data() const { return data_; }
+ size_t size() const { return size_; }
+ bool empty() const { return size_ == 0; }
+
+private:
+ const size_t size_;
+ T* const data_;
+};
+
+
+#if __cpp_lib_math_constants
+ #error get rid of workaround:
+#endif
+
+namespace numbers
+{
+const double pi = 3.14159265358979323846;
+const double e = 2.71828182845904523536;
+const double sqrt2 = 1.41421356237309504880;
+const double ln2 = 0.693147180559945309417;
+}
}
Zenju, my specific question for you is, what version of c++ library do you use, and how do you get it, and what compiler do you use?