forked from boostorg/unordered
Rename foa's emplace_dispatch to emplace_value
This commit is contained in:
@ -1393,7 +1393,7 @@ public:
|
|||||||
* inserted. For immovable types, we instead dispatch to the routine that
|
* inserted. For immovable types, we instead dispatch to the routine that
|
||||||
* unconditionally allocates via `type_policy::construct()`.
|
* unconditionally allocates via `type_policy::construct()`.
|
||||||
*/
|
*/
|
||||||
return emplace_dispatch(
|
return emplace_value(
|
||||||
std::is_constructible<
|
std::is_constructible<
|
||||||
value_type,
|
value_type,
|
||||||
emplace_type<Args...>&&>{},
|
emplace_type<Args...>&&>{},
|
||||||
@ -1873,16 +1873,16 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
BOOST_FORCEINLINE std::pair<iterator,bool> emplace_dispatch(
|
BOOST_FORCEINLINE std::pair<iterator,bool> emplace_value(
|
||||||
std::true_type,Args&&... args
|
std::true_type /* movable value_type */,Args&&... args
|
||||||
) {
|
) {
|
||||||
using emplace_type_t = emplace_type<Args...>;
|
using emplace_type_t = emplace_type<Args...>;
|
||||||
return emplace_impl(emplace_type_t(std::forward<Args>(args)...));
|
return emplace_impl(emplace_type_t(std::forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
BOOST_FORCEINLINE std::pair<iterator,bool> emplace_dispatch(
|
BOOST_FORCEINLINE std::pair<iterator,bool> emplace_value(
|
||||||
std::false_type,Args&&... args
|
std::false_type /* immovable value_type */,Args&&... args
|
||||||
) {
|
) {
|
||||||
alignas(element_type)
|
alignas(element_type)
|
||||||
unsigned char buf[sizeof(element_type)];
|
unsigned char buf[sizeof(element_type)];
|
||||||
|
Reference in New Issue
Block a user