FreeBSD-current recently [1] updated clang&co which means experimental/optional is no longer available,
and errors out as optional should be used.
- check if <optional> is present using __has_include
- simply define stdx = std
This also requires a change to Akonadi to remove the auto_ptr variant
of setPayload:
/usr/local/include/KF5/AkonadiCore/item.h:589:48: error: no template named 'auto_ptr' in namespace 'std' template <typename T> void setPayload(std::auto_ptr<T> p); ~~~~~^ /usr/local/include/KF5/AkonadiCore/item.h:1053:12: error: variable has incomplete type 'void' void Item::setPayload(std::auto_ptr<T> p) ^ /usr/local/include/KF5/AkonadiCore/item.h:1053:28: error: no member named 'auto_ptr' in namespace 'std' void Item::setPayload(std::auto_ptr<T> p) ~~~~~^ /usr/local/include/KF5/AkonadiCore/item.h:1053:37: error: 'T' does not refer to a value void Item::setPayload(std::auto_ptr<T> p) ^ /usr/local/include/KF5/AkonadiCore/item.h:1052:20: note: declared here template <typename T> ^ /usr/local/include/KF5/AkonadiCore/item.h:1053:40: error: use of undeclared identifier 'p' void Item::setPayload(std::auto_ptr<T> p) ^ /usr/local/include/KF5/AkonadiCore/item.h:1053:42: error: expected ';' at end of declaration void Item::setPayload(std::auto_ptr<T> p) ^ /usr/local/include/KF5/AkonadiCore/item.h:1054:1: error: expected unqualified-id { ^ 7 errors generated.
[1] https://svnweb.freebsd.org/base?view=revision&revision=341825