From 76bf394f731601b913b95ce2d9f2a67164f8530f Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sat, 3 Aug 2024 20:58:48 +0100 Subject: [PATCH] [*] Fix: typo in optional --- .../ThirdParty/tartanllamaOptional.hpp | 143 +++++++++--------- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git a/Include/auROXTL/ThirdParty/tartanllamaOptional.hpp b/Include/auROXTL/ThirdParty/tartanllamaOptional.hpp index 0b0e9e2..d42f5dc 100644 --- a/Include/auROXTL/ThirdParty/tartanllamaOptional.hpp +++ b/Include/auROXTL/ThirdParty/tartanllamaOptional.hpp @@ -213,10 +213,10 @@ namespace tl { template struct invoke_result_impl< - F, decltype(detail::invoke(AuDecalVal(), AuDecalVal()...), void()), + F, decltype(detail::invoke(AuDeclVal(), AuDeclVal()...), void()), Us...> { - using type = decltype(detail::invoke(AuDecalVal(), AuDecalVal()...)); + using type = decltype(detail::invoke(AuDeclVal(), AuDeclVal()...)); }; template @@ -247,13 +247,13 @@ namespace tl { // becomes std::swap template AuFalseType can_swap(...) noexcept(false); template (), AuDecalVal()))> - AuTrueType can_swap(int) noexcept(noexcept(swap(AuDecalVal(), - AuDecalVal()))); + class = decltype(swap(AuDeclVal(), AuDeclVal()))> + AuTrueType can_swap(int) noexcept(noexcept(swap(AuDeclVal(), + AuDeclVal()))); template AuFalseType uses_std(...); template - AuIsSame(), AuDecalVal())), tag> + AuIsSame(), AuDeclVal())), tag> uses_std(int); template @@ -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 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 - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) & { return optional_map_impl(*this, AuForward(f)); } template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) && { return optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) const & { return optional_map_impl(*this, AuForward(f)); @@ -1045,8 +1044,8 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) const && { return optional_map_impl(AuMove(*this), AuForward(f)); @@ -1054,24 +1053,24 @@ namespace tl { #endif /// Carries out some operation on the stored object if there is one. template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Map(F &&f) & { return optional_map_impl(*this, AuForward(f)); } template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Map(F &&f) && { return optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Map(F &&f) const & { return optional_map_impl(*this, AuForward(f)); @@ -1079,8 +1078,8 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Map(F &&f) const && { return optional_map_impl(AuMove(*this), AuForward(f)); @@ -1132,24 +1131,24 @@ namespace tl { #else /// Carries out some operation on the stored object if there is one. template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) & { return optional_map_impl(*this, AuForward(f)); } template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) && { return optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) const & { return optional_map_impl(*this, AuForward(f)); @@ -1157,32 +1156,32 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) const && { return optional_map_impl(AuMove(*this), AuForward(f)); } #endif template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) & { return optional_map_impl(*this, AuForward(f)); } template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) && { return optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) const & { return optional_map_impl(*this, AuForward(f)); @@ -1190,8 +1189,8 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) const && { return optional_map_impl(AuMove(*this), AuForward(f)); @@ -2225,8 +2224,8 @@ namespace tl { namespace detail { #ifdef TL_OPTIONAL_CXX14 template (), - *AuDecalVal())), + class Ret = decltype(detail::invoke(AuDeclVal(), + *AuDeclVal())), detail::enable_if_t::value> * = nullptr> constexpr auto optional_map_impl(Opt &&opt, F &&f) { @@ -2236,8 +2235,8 @@ namespace tl { } template (), - *AuDecalVal())), + class Ret = decltype(detail::invoke(AuDeclVal(), + *AuDeclVal())), detail::enable_if_t::value> * = nullptr> auto optional_map_impl(Opt &&opt, F &&f) { @@ -2251,8 +2250,8 @@ namespace tl { } #else template (), - *AuDecalVal())), + class Ret = decltype(detail::invoke(AuDeclVal(), + *AuDeclVal())), detail::enable_if_t::value> * = nullptr> constexpr auto optional_map_impl(Opt &&opt, F &&f) -> optional @@ -2263,8 +2262,8 @@ namespace tl { } template (), - *AuDecalVal())), + class Ret = decltype(detail::invoke(AuDeclVal(), + *AuDeclVal())), detail::enable_if_t::value> * = nullptr> auto optional_map_impl(Opt &&opt, F &&f) -> optional @@ -2410,24 +2409,24 @@ namespace tl { #else /// Carries out some operation on the stored object if there is one. template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) & { return detail::optional_map_impl(*this, AuForward(f)); } template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) && { return detail::optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) const & { return detail::optional_map_impl(*this, AuForward(f)); @@ -2435,8 +2434,8 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) map(F &&f) const && { return detail::optional_map_impl(AuMove(*this), AuForward(f)); @@ -2489,8 +2488,8 @@ namespace tl { #else /// Carries out some operation on the stored object if there is one. template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) & { return detail::optional_map_impl(*this, AuForward(f)); @@ -2499,16 +2498,16 @@ namespace tl { /// \group map /// \synopsis template auto transform(F &&f) &&; template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) && { return detail::optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) const & { return detail::optional_map_impl(*this, AuForward(f)); @@ -2516,16 +2515,16 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) transform(F &&f) const && { return detail::optional_map_impl(AuMove(*this), AuForward(f)); } #endif template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) & { return detail::optional_map_impl(*this, AuForward(f)); @@ -2534,16 +2533,16 @@ namespace tl { /// \group map /// \synopsis template auto Transform(F &&f) &&; template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) && { return detail::optional_map_impl(AuMove(*this), AuForward(f)); } template - constexpr decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) const & { return detail::optional_map_impl(*this, AuForward(f)); @@ -2551,8 +2550,8 @@ namespace tl { #ifndef TL_OPTIONAL_NO_CONSTRR template - constexpr decltype(detail::optional_map_impl(AuDecalVal(), - AuDecalVal())) + constexpr decltype(detail::optional_map_impl(AuDeclVal(), + AuDeclVal())) Transform(F &&f) const && { return detail::optional_map_impl(AuMove(*this), AuForward(f));