From 349db3aacd3f074e80a870dcb0a3ef37360b759f Mon Sep 17 00:00:00 2001 From: Bo Rydberg Date: Sun, 6 Jan 2019 19:52:59 +0100 Subject: [PATCH] Update flat_map.h to handle C++98 compilation (#112) --- include/etl/flat_map.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/etl/flat_map.h b/include/etl/flat_map.h index 408669a2..8fb59e21 100644 --- a/include/etl/flat_map.h +++ b/include/etl/flat_map.h @@ -76,7 +76,9 @@ namespace etl typedef TKeyCompare key_compare; typedef value_type& reference; typedef const value_type& const_reference; +#if ETL_CPP11_SUPPORTED typedef value_type&& rvalue_reference; +#endif typedef value_type* pointer; typedef const value_type* const_pointer; typedef size_t size_type; @@ -304,6 +306,7 @@ namespace etl return result; } +#if ETL_CPP11_SUPPORTED //********************************************************************* /// Inserts a value to the flat_map. /// If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full. @@ -328,6 +331,7 @@ namespace etl return result; } +#endif //********************************************************************* /// Inserts a value to the flat_map. @@ -340,6 +344,7 @@ namespace etl return insert(value).first; } +#if ETL_CPP11_SUPPORTED //********************************************************************* /// Inserts a value to the flat_map. /// If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full. @@ -350,6 +355,7 @@ namespace etl { return insert(std::move(value)).first; } +#endif //********************************************************************* /// Inserts a range of values to the flat_map.