[Qt-creator] C++11 in Creator's source: Update required features
Daniel Teske
Daniel.Teske at theqtcompany.com
Mon Mar 30 17:32:29 CEST 2015
> Now, we need to discuss our coding guidelines regarding those new features.
> While we don't need a coding guideline for each C++ feature, I think for
> those new features it's worth having a guideline on when to use them and
> how to use them.
>
> If anyone wants to propose a coding style, please come forward.
We had some discussions on some features in the office, and based on that I'd
like to propose the following coding guidelines:
- Use Delegating constructors, Initializer lists, Defaulted functions, Alias
templates where it makes sense.
Note: typedefs instead of Alias templates are still fine and there's no need to
mass convert typedefs.
- You can use Scoped Enums.
Note: Scoped Enums seem to be a somewhat mixed bad, making them not strictly
better than unscoped Enums. They are neither forbidden nor recommended. We
probably need more experience with this.
- You can use nullptr, but
Note: There was no consensus to ban nor to recommend them, but the majority
didn't think nullptr brings a benefit, so individually maintainers might object
to usage of nullptr.
daniel
More information about the Qt-creator
mailing list