# C++17 minimum deployment target

**URL:** <https://forum.juce.com/t/c-17-minimum-deployment-target/32109>\
**Category:** MacOSX and iOS\
**Created:** [March 5, 2019, 11:01am UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109 "2019-03-05T11:01:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [March 5, 2019, 11:01am UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109/1 "2019-03-05T11:01:49Z")

</div>

Hi fellow developers,

Does anybody know what is the minimum deployment target in order to support c++17 and its standard library (std::clamp FTW) on OSX ?

Thanks !

---

<div class="post-metadata">

**Author:** ![mcmartin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mcmartin/32/7432_2.png) [@mcmartin](https://forum.juce.com/u/mcmartin)\
**Post date:** [March 5, 2019, 11:34am UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109/2 "2019-03-05T11:34:17Z")

</div>

`std::clamp` is a function template. It should be defined entirely in the header, i.e. it shouldn’t rely on any library support from the OS. The same applies to `std::optional` and `std::variant`. However, it doesn’t apply to other parts of the standard library, like `std::filesystem`, but I don’t know which macOS version supports them.

---

<div class="post-metadata">

**Author:** ![tcarpent](https://avatars.discourse-cdn.com/v4/letter/t/49beb7/32.png) [@tcarpent](https://forum.juce.com/u/tcarpent)\
**Post date:** [March 5, 2019, 1:25pm UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109/3 "2019-03-05T13:25:45Z")

</div>

I believe it’s 10.7

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [March 5, 2019, 1:39pm UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109/4 "2019-03-05T13:39:12Z")

</div>

for c++11, it’s true. Pretty sure this is not true for C++17 though hence my question for someone with the knowledge

---

<div class="post-metadata">

**Author:** ![mcmartin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mcmartin/32/7432_2.png) [@mcmartin](https://forum.juce.com/u/mcmartin)\
**Post date:** [March 5, 2019, 2:22pm UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109/5 "2019-03-05T14:22:56Z")

</div>

Xcode 10.1 with the 10.14 SDK doesn’t have support of all C++17 library features. So a minimum deployment target that supports all of C++17 simply doesn’t exist.

You need to decide what exactly you want to use from C++17 and then we can try to figure out what the minimum deployment target is.

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [March 5, 2019, 4:04pm UTC](https://forum.juce.com/t/c-17-minimum-deployment-target/32109/6 "2019-03-05T16:04:21Z")

</div>

well it’s mostly cpp14 with some minor stuff from cpp17 like clamp which is indeed header only so I am probably safe with cpp14 only which looks like to require 10.9
