make it tolerant of TBB 2020
https://github.com/Project-OSRM/osrm-backend/pull/6493

Index: src/extractor/extractor.cpp
--- src/extractor/extractor.cpp.orig
+++ src/extractor/extractor.cpp
@@ -44,7 +44,11 @@
 #include <osmium/thread/pool.hpp>
 #include <osmium/visitor.hpp>
 #include <tbb/global_control.h>
+#if TBB_VERSION_MAJOR == 2020
+#include <tbb/pipeline.h>
+#else
 #include <tbb/parallel_pipeline.h>
+#endif
 
 #include <algorithm>
 #include <memory>
@@ -433,8 +437,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip
 
     const auto buffer_reader = [](osmium::io::Reader &reader)
     {
+#if TBB_VERSION_MAJOR == 2020
+        return tbb::filter_t<void, SharedBuffer>(
+            tbb::filter::serial_in_order,
+#else
         return tbb::filter<void, SharedBuffer>(
             tbb::filter_mode::serial_in_order,
+#endif
             [&reader](tbb::flow_control &fc)
             {
                 if (auto buffer = reader.read())
@@ -457,8 +466,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip
     osmium_index_type location_cache;
     osmium_location_handler_type location_handler(location_cache);
 
+#if TBB_VERSION_MAJOR == 2020
+    tbb::filter_t<SharedBuffer, SharedBuffer> location_cacher(
+        tbb::filter::serial_in_order,
+#else
     tbb::filter<SharedBuffer, SharedBuffer> location_cacher(
         tbb::filter_mode::serial_in_order,
+#endif
         [&location_handler](SharedBuffer buffer)
         {
             osmium::apply(buffer->begin(), buffer->end(), location_handler);
@@ -466,8 +480,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip
         });
 
     // OSM elements Lua parser
+#if TBB_VERSION_MAJOR == 2020
+    tbb::filter_t<SharedBuffer, ParsedBuffer> buffer_transformer(
+        tbb::filter::parallel,
+#else
     tbb::filter<SharedBuffer, ParsedBuffer> buffer_transformer(
         tbb::filter_mode::parallel,
+#endif
         // NOLINTNEXTLINE(performance-unnecessary-value-param)
         [&](const SharedBuffer buffer)
         {
@@ -489,8 +508,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip
     unsigned number_of_ways = 0;
     unsigned number_of_restrictions = 0;
     unsigned number_of_maneuver_overrides = 0;
+#if TBB_VERSION_MAJOR == 2020
+    tbb::filter_t<ParsedBuffer, void> buffer_storage(
+        tbb::filter::serial_in_order,
+#else
     tbb::filter<ParsedBuffer, void> buffer_storage(
         tbb::filter_mode::serial_in_order,
+#endif
         [&](const ParsedBuffer &parsed_buffer)
         {
             number_of_nodes += parsed_buffer.resulting_nodes.size();
@@ -519,8 +543,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip
             }
         });
 
+#if TBB_VERSION_MAJOR == 2020
+    tbb::filter_t<SharedBuffer, std::shared_ptr<ExtractionRelationContainer>> buffer_relation_cache(
+        tbb::filter::parallel,
+#else
     tbb::filter<SharedBuffer, std::shared_ptr<ExtractionRelationContainer>> buffer_relation_cache(
         tbb::filter_mode::parallel,
+#endif
         // NOLINTNEXTLINE(performance-unnecessary-value-param)
         [&](const SharedBuffer buffer)
         {
@@ -558,8 +587,13 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(Scrip
         });
 
     unsigned number_of_relations = 0;
+#if TBB_VERSION_MAJOR == 2020
+    tbb::filter_t<std::shared_ptr<ExtractionRelationContainer>, void> buffer_storage_relation(
+        tbb::filter::serial_in_order,
+#else
     tbb::filter<std::shared_ptr<ExtractionRelationContainer>, void> buffer_storage_relation(
         tbb::filter_mode::serial_in_order,
+#endif
         // NOLINTNEXTLINE(performance-unnecessary-value-param)
         [&](const std::shared_ptr<ExtractionRelationContainer> parsed_relations)
         {
