Skip to content

Commit 62f409e

Browse files
committed
Disable example for Clang
1 parent 3e43edf commit 62f409e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

examples/for_each_extents/for_each_extents_no_ranges.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ namespace stdex = std::experimental;
1212
# define MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST 1
1313
#endif
1414

15-
#if defined(MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST)
15+
// This example doesn't currently work with Clang,
16+
// because Clang doesn't like structured binding results
17+
// being captured by inner lambdas.
18+
#if ! defined(__clang__) && defined(MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST)
1619

1720
//////////////////////////////////////////////////////////////////////////
1821
// Part 1: Compile-time iteration
@@ -339,11 +342,11 @@ void for_each_in_extents(Callable&& callable,
339342
extents_reverse, split_extents_at_rightmost, indices_reverse);
340343
}
341344

342-
#endif // defined(MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST)
345+
#endif // ! defined(__clang__) && defined(MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST)
343346

344347
int main() {
345348

346-
#if defined(MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST)
349+
#if ! defined(__clang__) && defined(MDSPAN_EXAMPLE_CAN_USE_LAMBDA_TEMPLATE_PARAM_LIST)
347350
// The functions work for any combination
348351
// of compile-time or run-time extents.
349352
stdex::extents<int, 3, stdex::dynamic_extent, 5> e{4};

0 commit comments

Comments
 (0)