From 6ed3ba2f428cab180dd2518b155bb2fd7563e03f Mon Sep 17 00:00:00 2001 From: "Serov, Vladimir" Date: Tue, 21 Dec 2021 11:31:11 +0300 Subject: [PATCH] Build issue: GCC 4.8 bug Class template inheritance doesn't work well with function-local types Move class definution to global scope Signed-off-by: Serov, Vladimir --- test/tbb/test_limiter_node.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/tbb/test_limiter_node.cpp b/test/tbb/test_limiter_node.cpp index 222c68fcbc..6655b54d5e 100644 --- a/test/tbb/test_limiter_node.cpp +++ b/test/tbb/test_limiter_node.cpp @@ -605,18 +605,18 @@ TEST_CASE( "Deduction guides" ) { } #endif +struct TestLargeStruct { + char bytes[512]{ 0 }; +}; + //! Test correct node deallocation while using small_object_pool. //! (see https://github.com/oneapi-src/oneTBB/issues/639) //! \brief \ref error_guessing TEST_CASE("Test correct node deallocation while using small_object_pool") { - struct TestLargeStruct { - char bytes[512]{ 0 }; - }; - tbb::flow::graph graph; - tbb::flow::queue_node input_node{ graph }; - tbb::flow::function_node func{ graph, tbb::flow::serial, - [](const TestLargeStruct& input) { return input; } }; + tbb::flow::queue_node input_node( graph ); + tbb::flow::function_node func( graph, tbb::flow::serial, + [](const TestLargeStruct& input) { return input; } ); tbb::flow::make_edge( input_node, func ); CHECK( input_node.try_put( TestLargeStruct{} ) );