# May we start using C++14 at the master branch?

**URL:** https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172
**Category:** Engineering
**Created:** [May 31, 2021, 1:57pm UTC](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172 "2021-05-31T13:57:07Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![seanm](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.itk.org/u/seanm)
#### Post date: [June 2, 2021, 3:36pm UTC](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172/21 "2021-06-02T15:36:17Z")

</div>

I’ve just checked all my bots, and most already specify -std=c++14 or -std=c++17, but one had -std=c++11, so I’ve updated that to 14. Let’s see how it does tomorrow…

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 3, 2021, 1:28pm UTC](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172/22 "2021-06-03T13:28:57Z")

</div>

I just merged Niels’ patch! 🎉🎆🥳

---

<div class="post-metadata">

### Author: ![Niels\_Dekker](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/9d8465/32.png) [@Niels\_Dekker](https://discourse.itk.org/u/Niels_Dekker)
#### Post date: [June 4, 2021, 12:34pm UTC](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172/23 "2021-06-04T12:34:22Z")

</div>

@seanm Back in December 2019 ITK already required _AppleClang 7.0.2 and later (from Xcode 7.2.1)_, as you committed:

> <https://github.com/InsightSoftwareConsortium/ITK/commit/333bfc690dca71a63ea884b0ac42eaa63e62e2c3#>
>
> The error message was:
> 
> Modules/Core/Common/test/itkImageIORegionGTest.cxx:173:…28: error: default initialization of an object of const type 'const itk::ImageIORegion' without a user-provided default constructor
> const itk::ImageIORegion defaultInitializedRegion;
> ^
> 
> Just removed a 'const' as suggested by Niels Dekker.
> 
> Also added a note to the supported compilers list about AppleClang.

From [COMP: fixed compilation with AppleClang 7 and 8. by seanm · Pull Request #1464 · InsightSoftwareConsortium/ITK · GitHub](https://github.com/InsightSoftwareConsortium/ITK/pull/1464)

So do I understand correctly that AppleClang 5.1 + Xcode 5.1 have been dropped already before? Then maybe we should still adjust itkCompilerChecks.cmake:

> <https://github.com/InsightSoftwareConsortium/ITK/blob/c97530a44930d971d0c0b6b736ae5266066ecb27/CMake/itkCompilerChecks.cmake#L13-L17>

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.itk.org/u/seanm)
#### Post date: [June 7, 2021, 9:49pm UTC](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172/24 "2021-06-07T21:49:43Z")

</div>

Niels, hmmm, not sure there was any great thought in that commit, it looks like previous to that AppleClang just wasn’t mentioned in that file. Personally, I’m ok with Xcode 7.2.1 being the minimum.

---

<div class="post-metadata">

### Author: ![Niels\_Dekker](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/9d8465/32.png) [@Niels\_Dekker](https://discourse.itk.org/u/Niels_Dekker)
#### Post date: [June 9, 2021, 3:34pm UTC](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172/25 "2021-06-09T15:34:27Z")

</div>

> [@seanm](#):
>
> I’m ok with Xcode 7.2.1 being the minimum

Thanks @seanm Do you mean that you actually still need to compile the latest ITK version on Xcode 7.2.1?

[Previous page](https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172.md?page=1)
