Just including <optional> fails with the following: (with -std=c++1z) In file included from test.cpp:1: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:27: error: use of class template 'optional' requires template arguments template <typename _Tp> optional(_Tp) -> optional<_Tp>; ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:451:11: note: template is declared here class optional ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:40: error: expected ';' at end of declaration template <typename _Tp> optional(_Tp) -> optional<_Tp>; ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:41: error: cannot use arrow operator on a type template <typename _Tp> optional(_Tp) -> optional<_Tp>; ^
This has been reported to work with clang 5.0
*** Bug 33488 has been marked as a duplicate of this bug. ***
This is fixed as of r295696.
(In reply to Tom Stellard from comment #3) > This is fixed as of r295696. The fix will be in 5.0.0.