-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation fails with g++ #58
Comments
+1 EDIT: The problem is solved for me. It was sitting in front of the computer and could not read the installation instructions properly. |
Hi @alzeha, How did you fix the problem ? With g++10 the only way I have found to fix it, is to comment the declaration of
in |
The first time I tried it, I set the build directory as a subdirectory of tchecker and the installation directory as well. But they have to be next to each other, then it suddenly works. I have also made the action live on my fork (https://github.com/Echtzeitsysteme/tchecker). So you can take a look inside to see how you have to call the various commands. |
Thanks. Your docker image use Boost 1.81 and GCC 12. |
Sure. Locally, I use g++ 11, but also with boost 1.81. I'm sorry I can't help you further. |
Hi, I've reduced the problem to the following lines. Operator
|
Thanks @pictavien , here is a similar example, without boost: #include <iostream>
#include <limits>
#include <type_traits>
template <class IntType> class rational {
public:
template <class T>
rational(const T& n,
typename std::enable_if_t<std::numeric_limits<T>::is_specialized>::type const * = 0) {}
};
using clock_rational_value_t = rational<int64_t>;
std::ostream & operator<<(std::ostream & os, clock_rational_value_t b);
class statement_t {
public:
virtual void func() = 0;
};
std::ostream & operator<<(std::ostream & os, statement_t const & s);
void f(std::ostream & os, statement_t * s)
{
os << *s;
} I get the same error messages as mentionned in @osankur post above. However, I get no error if the initializer |
I finally wrote a simpler, standalone, example: #include <cstdint>
#include <ostream>
template <class T> class A {
public:
typedef T type;
T f() {}
};
template <class IntType> class rational {
public:
template <class T>
rational(const T & n, typename A<T>::type const * = nullptr) {}
};
using clock_rational_value_t = rational<int64_t>;
std::ostream & operator<<(std::ostream & os, clock_rational_value_t b);
class statement_t {
public:
virtual ~statement_t() {}
virtual void func() = 0;
};
std::ostream & operator<<(std::ostream & os, statement_t const & s);
void f(std::ostream & os, statement_t * s)
{
os << *s;
} The compiler message is clearer now:
What happens is that instruction |
Finally I have reduced the problem to the following example. g++10 fails to compile it while it works with g++ 12. #include <limits>
class statement_t {
public:
virtual void func() = 0;
};
static_assert(! std::numeric_limits<statement_t>::is_specialized); |
I wasn't able to compile the release v0.7 with g++ 10.5.0. I get the following error:
This compiles without any issue with clang-10.0.0.
The text was updated successfully, but these errors were encountered: