Skip to content

Commit

Permalink
Merge pull request #17 from melak47/fix-dependent-typename
Browse files Browse the repository at this point in the history
add missing typename in TRY_OK and TRY_SOME
  • Loading branch information
lamarrr authored Sep 22, 2020
2 parents 3871aac + 45894b7 commit 5e62958
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/stx/internal/try.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ STX_END_NAMESPACE
return ::stx::Err<decltype((result_expr))::error_type>( \
::stx::internal::result::unsafe_err_move(STX_ARG_UNIQUE_PLACEHOLDER)); \
\
decltype((result_expr))::value_type qualifier_identifier = \
typename decltype((result_expr))::value_type qualifier_identifier = \
::stx::internal::result::unsafe_value_move(STX_ARG_UNIQUE_PLACEHOLDER);

#define STX_TRY_SOME_IMPL_(STX_ARG_UNIQUE_PLACEHOLDER, qualifier_identifier, \
Expand All @@ -96,7 +96,7 @@ STX_END_NAMESPACE
\
if (STX_ARG_UNIQUE_PLACEHOLDER.is_none()) return ::stx::None; \
\
decltype((option_expr))::value_type qualifier_identifier = \
typename decltype((option_expr))::value_type qualifier_identifier = \
::stx::internal::option::unsafe_value_move(STX_ARG_UNIQUE_PLACEHOLDER);

/// if `result_expr` is a `Result` containing an error, `TRY_OK` returns its
Expand Down Expand Up @@ -139,7 +139,7 @@ STX_END_NAMESPACE
co_return ::stx::Err<decltype((result_expr))::error_type>( \
::stx::internal::result::unsafe_err_move(STX_ARG_UNIQUE_PLACEHOLDER)); \
\
decltype((result_expr))::value_type qualifier_identifier = \
typename decltype((result_expr))::value_type qualifier_identifier = \
::stx::internal::result::unsafe_value_move(STX_ARG_UNIQUE_PLACEHOLDER);

#define STX_CO_TRY_SOME_IMPL_(STX_ARG_UNIQUE_PLACEHOLDER, \
Expand All @@ -156,7 +156,7 @@ STX_END_NAMESPACE
\
if (STX_ARG_UNIQUE_PLACEHOLDER.is_none()) co_return ::stx::None; \
\
decltype((option_expr))::value_type qualifier_identifier = \
typename decltype((option_expr))::value_type qualifier_identifier = \
::stx::internal::option::unsafe_value_move(STX_ARG_UNIQUE_PLACEHOLDER);

/// COROUTINES ONLY. if `result_expr` is `Result` containing an error,
Expand Down

0 comments on commit 5e62958

Please sign in to comment.