Check your project settings. I suspect that your project isn’t set to use C++11. #include <chrono> works fine in my UE4 project. I’m compiling with C++11, the project may not default to it.
What are you trying to accomplish? While there are times when using standard C++ libraries makes sense, there is very often a better solution provided by Epic in the engine.
The Xcode project has been generated by UE, I tried also to manually set the project variables CLANG_CXX_LANGUAGE_STANDARD and CLANG_CXX_LIBRARY (respectively to “C++11” and “libc++”) but nothing changes.
I need a timestamp for a network protocol, now I’m trying to use FPlatformTime as a work-around.
Which version of UE4, and which version of Xcode are you using? Also, did you do a clean after changing the project settings but before compiling again?
Clean & build done, I also recreated the Xcode project from scratch but nothing changed. Now it also complains with missing std::unique_ptr<> (another C++11 feature).
I agree that the project seems to be not configured for C++11, but it’s strange as UE4.5 headers uses it. Any idea?