I am using C++ in Xcode version 8.1. I need to use the functionality of boost::any
but am strongly opposed to pulling any part of Boost into our project (let's not debate it please).
I see that std::any
is "merged into C++17" here.
I want to use this in my Xcode 8.1 project. I have tried using -std=c++1z
as a custom flag on the project, but I can't seem to find a header for it.
How can I use std::any
or std::experimental::any
in my Xcode project?
Can I download the appropriate headers from an implementation and throw them into my project's sourcecode? Or, even better, is actually available to now in my version of Xcode/Clang/C++?
boost::any
is. – Radiation<experimental/optional>
. Apple stopped reporting which version of LLVM it is based on long ago. But if I have to guess, I would say LLVM release 3.7, bases on the_LIB_CPP
macro – Pleaderany
is only part you need from Boost, one way is to write your in-house version. Sometime it might be worth the effort. You can look into libstdc++, libc++, or Boost's implementation for inspirations. I used to maintain a subset of type_traits in my library for the same reason a few years ago. It's not that bad. However, only you and your team can decide the trade-off – Pleader