C++17 minimum deployment target


#1

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 !


#2

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.


#3

I believe it’s 10.7


#4

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


#5

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.


#6

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