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

enable c++11 mode in company-clang-arguments #5654

Closed
wants to merge 1 commit into from

Conversation

eklitzke
Copy link
Contributor

@eklitzke eklitzke commented Apr 1, 2016

This adds a new variable, c-c++-enable-c++11 which follows the existing c-c++ variable naming conventions.

When the value is not nil (it is nil by default) then company-clang-arguments are set up to use -std=c++11

@eklitzke
Copy link
Contributor Author

eklitzke commented Apr 2, 2016

I added another change like

(when c-c++-enable-c++11
      (setq flycheck-clang-language-standard "c++11"))

This should help people using flycheck and getting spelling errors about words like nullptr

@syl20bnr
Copy link
Owner

syl20bnr commented Apr 5, 2016

The variable is good but I would like the variable to be overridable at the project level via directory and file local variables.
So we can find some hook to be able to read the variable c-c++-enable-c++11 and set the flags accordingly.

@eklitzke
Copy link
Contributor Author

eklitzke commented Apr 6, 2016

Let me think about this idea some more and then update the diff.

@syl20bnr syl20bnr changed the title enable c++11 mode in company-clang-arguments if c-c++-enable-c++11 is… enable c++11 mode in company-clang-arguments Feb 12, 2017
@delaanthonio
Copy link
Contributor

delaanthonio commented Jun 8, 2017

Why not have a c-c++-language-standard variable that flycheck can read from instead of c-c++-enable-c++11? This avoids needing a c-c++-enable-c++22 in the future.

@syl20bnr
Copy link
Owner

Thank you again (and still one year and a half late :-)) !

@beta1440 I'm refactoring the c-c++ layer, I'll take your remark into account.

Cherry-picked into develop branch, you can safely delete your branch.

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

Successfully merging this pull request may close these issues.

None yet

4 participants