[*] Fix: typo in optional
This commit is contained in:
parent
d0dd1f9015
commit
76bf394f73
143
Include/auROXTL/ThirdParty/tartanllamaOptional.hpp
vendored
143
Include/auROXTL/ThirdParty/tartanllamaOptional.hpp
vendored
@ -213,10 +213,10 @@ namespace tl {
|
||||
|
||||
template <class F, class... Us>
|
||||
struct invoke_result_impl<
|
||||
F, decltype(detail::invoke(AuDecalVal<F>(), AuDecalVal<Us>()...), void()),
|
||||
F, decltype(detail::invoke(AuDeclVal<F>(), AuDeclVal<Us>()...), void()),
|
||||
Us...>
|
||||
{
|
||||
using type = decltype(detail::invoke(AuDecalVal<F>(), AuDecalVal<Us>()...));
|
||||
using type = decltype(detail::invoke(AuDeclVal<F>(), AuDeclVal<Us>()...));
|
||||
};
|
||||
|
||||
template <class F, class... Us>
|
||||
@ -247,13 +247,13 @@ namespace tl {
|
||||
// becomes std::swap
|
||||
template <class, class> AuFalseType can_swap(...) noexcept(false);
|
||||
template <class T, class U,
|
||||
class = decltype(swap(AuDecalVal<T &>(), AuDecalVal<U &>()))>
|
||||
AuTrueType can_swap(int) noexcept(noexcept(swap(AuDecalVal<T &>(),
|
||||
AuDecalVal<U &>())));
|
||||
class = decltype(swap(AuDeclVal<T &>(), AuDeclVal<U &>()))>
|
||||
AuTrueType can_swap(int) noexcept(noexcept(swap(AuDeclVal<T &>(),
|
||||
AuDeclVal<U &>())));
|
||||
|
||||
template <class, class> AuFalseType uses_std(...);
|
||||
template <class T, class U>
|
||||
AuIsSame<decltype(swap(AuDecalVal<T &>(), AuDecalVal<U &>())), tag>
|
||||
AuIsSame<decltype(swap(AuDeclVal<T &>(), AuDeclVal<U &>())), tag>
|
||||
uses_std(int);
|
||||
|
||||
template <class T>
|
||||
@ -975,8 +975,7 @@ namespace tl {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \
|
||||
!defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55)
|
||||
#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) && !defined(AURORA_COMPILER_MSVC)
|
||||
/// Carries out some operation on the stored object if there is one.
|
||||
template <class F> TL_OPTIONAL_11_CONSTEXPR auto map(F &&f) &
|
||||
{
|
||||
@ -1020,24 +1019,24 @@ namespace tl {
|
||||
#else
|
||||
/// Carries out some operation on the stored object if there is one.
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) const &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -1045,8 +1044,8 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) const &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
@ -1054,24 +1053,24 @@ namespace tl {
|
||||
#endif
|
||||
/// Carries out some operation on the stored object if there is one.
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Map(F &&f) &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Map(F &&f) &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Map(F &&f) const &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -1079,8 +1078,8 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Map(F &&f) const &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
@ -1132,24 +1131,24 @@ namespace tl {
|
||||
#else
|
||||
/// Carries out some operation on the stored object if there is one.
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) const &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -1157,32 +1156,32 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) const &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
#endif
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) const &
|
||||
{
|
||||
return optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -1190,8 +1189,8 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) const &&
|
||||
{
|
||||
return optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
@ -2225,8 +2224,8 @@ namespace tl {
|
||||
namespace detail {
|
||||
#ifdef TL_OPTIONAL_CXX14
|
||||
template <class Opt, class F,
|
||||
class Ret = decltype(detail::invoke(AuDecalVal<F>(),
|
||||
*AuDecalVal<Opt>())),
|
||||
class Ret = decltype(detail::invoke(AuDeclVal<F>(),
|
||||
*AuDeclVal<Opt>())),
|
||||
detail::enable_if_t<!AuIsVoid<Ret>::value> * = nullptr>
|
||||
constexpr auto optional_map_impl(Opt &&opt, F &&f)
|
||||
{
|
||||
@ -2236,8 +2235,8 @@ namespace tl {
|
||||
}
|
||||
|
||||
template <class Opt, class F,
|
||||
class Ret = decltype(detail::invoke(AuDecalVal<F>(),
|
||||
*AuDecalVal<Opt>())),
|
||||
class Ret = decltype(detail::invoke(AuDeclVal<F>(),
|
||||
*AuDeclVal<Opt>())),
|
||||
detail::enable_if_t<AuIsVoid<Ret>::value> * = nullptr>
|
||||
auto optional_map_impl(Opt &&opt, F &&f)
|
||||
{
|
||||
@ -2251,8 +2250,8 @@ namespace tl {
|
||||
}
|
||||
#else
|
||||
template <class Opt, class F,
|
||||
class Ret = decltype(detail::invoke(AuDecalVal<F>(),
|
||||
*AuDecalVal<Opt>())),
|
||||
class Ret = decltype(detail::invoke(AuDeclVal<F>(),
|
||||
*AuDeclVal<Opt>())),
|
||||
detail::enable_if_t<!AuIsVoid<Ret>::value> * = nullptr>
|
||||
|
||||
constexpr auto optional_map_impl(Opt &&opt, F &&f) -> optional<Ret>
|
||||
@ -2263,8 +2262,8 @@ namespace tl {
|
||||
}
|
||||
|
||||
template <class Opt, class F,
|
||||
class Ret = decltype(detail::invoke(AuDecalVal<F>(),
|
||||
*AuDecalVal<Opt>())),
|
||||
class Ret = decltype(detail::invoke(AuDeclVal<F>(),
|
||||
*AuDeclVal<Opt>())),
|
||||
detail::enable_if_t<AuIsVoid<Ret>::value> * = nullptr>
|
||||
|
||||
auto optional_map_impl(Opt &&opt, F &&f) -> optional<monostate>
|
||||
@ -2410,24 +2409,24 @@ namespace tl {
|
||||
#else
|
||||
/// Carries out some operation on the stored object if there is one.
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) &
|
||||
{
|
||||
return detail::optional_map_impl(*this, AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) &&
|
||||
{
|
||||
return detail::optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(detail::optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(detail::optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) const &
|
||||
{
|
||||
return detail::optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -2435,8 +2434,8 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(detail::optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(detail::optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
map(F &&f) const &&
|
||||
{
|
||||
return detail::optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
@ -2489,8 +2488,8 @@ namespace tl {
|
||||
#else
|
||||
/// Carries out some operation on the stored object if there is one.
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) &
|
||||
{
|
||||
return detail::optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -2499,16 +2498,16 @@ namespace tl {
|
||||
/// \group map
|
||||
/// \synopsis template <class F> auto transform(F &&f) &&;
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) &&
|
||||
{
|
||||
return detail::optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(detail::optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(detail::optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) const &
|
||||
{
|
||||
return detail::optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -2516,16 +2515,16 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(detail::optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(detail::optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
transform(F &&f) const &&
|
||||
{
|
||||
return detail::optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
#endif
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal<optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal<optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) &
|
||||
{
|
||||
return detail::optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -2534,16 +2533,16 @@ namespace tl {
|
||||
/// \group map
|
||||
/// \synopsis template <class F> auto Transform(F &&f) &&;
|
||||
template <class F>
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal<optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal<optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) &&
|
||||
{
|
||||
return detail::optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
}
|
||||
|
||||
template <class F>
|
||||
constexpr decltype(detail::optional_map_impl(AuDecalVal<const optional &>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(detail::optional_map_impl(AuDeclVal<const optional &>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) const &
|
||||
{
|
||||
return detail::optional_map_impl(*this, AuForward<F>(f));
|
||||
@ -2551,8 +2550,8 @@ namespace tl {
|
||||
|
||||
#ifndef TL_OPTIONAL_NO_CONSTRR
|
||||
template <class F>
|
||||
constexpr decltype(detail::optional_map_impl(AuDecalVal<const optional &&>(),
|
||||
AuDecalVal<F &&>()))
|
||||
constexpr decltype(detail::optional_map_impl(AuDeclVal<const optional &&>(),
|
||||
AuDeclVal<F &&>()))
|
||||
Transform(F &&f) const &&
|
||||
{
|
||||
return detail::optional_map_impl(AuMove(*this), AuForward<F>(f));
|
||||
|
Loading…
Reference in New Issue
Block a user