--- /dev/null
+// -*- C++ -*-
+/**
+ * \file optional.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Yuriy Skalko
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef LYX_OPTIONAL_H
+#define LYX_OPTIONAL_H
+
+#if __cplusplus >= 201703L
+ #include <optional>
+ namespace lyx { using std::optional; }
+#else
+ #include <boost/optional.hpp>
+ namespace lyx { using boost::optional; }
+#endif
+
+#endif // LYX_OPTIONAL_H