#ifndef CNOID_STDX_OPTIONAL_HEADER
#define CNOID_STDX_OPTIONAL_HEADER

#include <optional>

namespace cnoid::stdx {

using std::optional;
using std::nullopt;

template<class T, class... Args>
[[deprecated("Use std::optional::emplace() member function instead")]]
T& emplace(optional<T>& opt, Args&&... args){
    return opt.emplace(std::forward<Args>(args)...);
}

template<class T>
[[deprecated("Use std::optional::emplace() member function instead")]]
T& emplace(optional<T>& opt){
    return opt.emplace();
}

}

#endif
