Skip to content
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

Change static_assert from one to two arguments. #47

Open
ghost opened this issue Apr 10, 2017 · 0 comments
Open

Change static_assert from one to two arguments. #47

ghost opened this issue Apr 10, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 10, 2017

Static_assert with 1 or 2 arguments is supported since gcc 6, older gcc 5 doesn't support static_assert with 1 argument:

In file included from /home/lekto/programy/orbital/src/compositor/global.h:23:0,
                 from /home/lekto/programy/orbital/src/compositor/compositor.h:29,
                 from /home/lekto/programy/orbital/src/compositor/main.cpp:26:
/home/lekto/programy/orbital/src/compositor/utils.h: In member function ‘void Signal<Args>::connect(T*, void (F::*)(FArgs ...))’:
/home/lekto/programy/orbital/src/compositor/utils.h:119:51: error: expected ‘,’ before ‘)’ token
         static_assert(std::is_base_of<F, T>::value);
                                                   ^
/home/lekto/programy/orbital/src/compositor/utils.h:119:51: error: expected string-literal before ‘)’ token

After change this line to:
static_assert(std::is_base_of<F, T>::value, "foo");
i succesfully build it with gcc 5.4 and run orbital.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants