mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 22:59:47 +08:00
Added emplace functions supporting up to four parameters to the following containers.
forward_list list vector queue priority_queue stack # Conflicts: # src/vector.h # test/data.h # test/vs2017/random.csv
This commit is contained in:
parent
c981bd0c96
commit
f526a0172f
@ -1,5 +1,5 @@
|
||||
name=Embedded Template Library
|
||||
version=9.1.8
|
||||
version=9.2.0
|
||||
author= John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
sentence=A C++ template library tailored for embedded systems.
|
||||
|
||||
@ -285,7 +285,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(queue_full));
|
||||
#endif
|
||||
::new (&p_buffer[in]) T(value1);
|
||||
in = (in == (MAX_SIZE - 1)) ? 0 : in + 1;
|
||||
in = (in == (CAPACITY - 1)) ? 0 : in + 1;
|
||||
++current_size;
|
||||
++construct_count;
|
||||
}
|
||||
@ -302,7 +302,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(queue_full));
|
||||
#endif
|
||||
::new (&p_buffer[in]) T(value1, value2);
|
||||
in = (in == (MAX_SIZE - 1)) ? 0 : in + 1;
|
||||
in = (in == (CAPACITY - 1)) ? 0 : in + 1;
|
||||
++current_size;
|
||||
++construct_count;
|
||||
}
|
||||
@ -319,7 +319,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(queue_full));
|
||||
#endif
|
||||
::new (&p_buffer[in]) T(value1, value2, value3);
|
||||
in = (in == (MAX_SIZE - 1)) ? 0 : in + 1;
|
||||
in = (in == (CAPACITY - 1)) ? 0 : in + 1;
|
||||
++current_size;
|
||||
++construct_count;
|
||||
}
|
||||
@ -336,7 +336,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(queue_full));
|
||||
#endif
|
||||
::new (&p_buffer[in]) T(value1, value2, value3, value4);
|
||||
in = (in == (MAX_SIZE - 1)) ? 0 : in + 1;
|
||||
in = (in == (CAPACITY - 1)) ? 0 : in + 1;
|
||||
++current_size;
|
||||
++construct_count;
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ namespace
|
||||
CHECK_EQUAL(6U, data.size());
|
||||
CHECK_EQUAL(6, std::distance(data.begin(), data.end()));
|
||||
|
||||
CHECK_EQUAL(std::distance(compare_data.begin(), compare_data.end()), data.size());
|
||||
CHECK_EQUAL(size_t(std::distance(compare_data.begin(), compare_data.end())), data.size());
|
||||
|
||||
are_equal = std::equal(data.begin(), data.end(), compare_data.begin());
|
||||
CHECK(are_equal);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user