Avoid astyle's padding in ordered_map::emplace's template headers
Use detail::conjunction instead of && and drop the redundant V&& in detail::is_constructible, so astyle keeps the usual template formatting. Addresses review comment by @gregmarr. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -71,7 +71,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class V, detail::enable_if_t<
|
template<class V, detail::enable_if_t<
|
||||||
detail::is_constructible < T, V&& >::value, int > = 0 >
|
detail::is_constructible<T, V>::value, int> = 0>
|
||||||
std::pair<iterator, bool> emplace(const key_type& key, V && t)
|
std::pair<iterator, bool> emplace(const key_type& key, V && t)
|
||||||
{
|
{
|
||||||
for (auto it = this->begin(); it != this->end(); ++it)
|
for (auto it = this->begin(); it != this->end(); ++it)
|
||||||
@@ -86,8 +86,8 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class KeyType, class V, detail::enable_if_t<
|
template<class KeyType, class V, detail::enable_if_t<
|
||||||
detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value&&
|
detail::conjunction<detail::is_usable_as_key_type<key_compare, key_type, KeyType>,
|
||||||
detail::is_constructible < T, V&& >::value, int > = 0 >
|
detail::is_constructible<T, V>>::value, int> = 0>
|
||||||
std::pair<iterator, bool> emplace(KeyType && key, V && t)
|
std::pair<iterator, bool> emplace(KeyType && key, V && t)
|
||||||
{
|
{
|
||||||
for (auto it = this->begin(); it != this->end(); ++it)
|
for (auto it = this->begin(); it != this->end(); ++it)
|
||||||
|
|||||||
@@ -25833,7 +25833,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class V, detail::enable_if_t<
|
template<class V, detail::enable_if_t<
|
||||||
detail::is_constructible < T, V&& >::value, int > = 0 >
|
detail::is_constructible<T, V>::value, int> = 0>
|
||||||
std::pair<iterator, bool> emplace(const key_type& key, V && t)
|
std::pair<iterator, bool> emplace(const key_type& key, V && t)
|
||||||
{
|
{
|
||||||
for (auto it = this->begin(); it != this->end(); ++it)
|
for (auto it = this->begin(); it != this->end(); ++it)
|
||||||
@@ -25848,8 +25848,8 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class KeyType, class V, detail::enable_if_t<
|
template<class KeyType, class V, detail::enable_if_t<
|
||||||
detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value&&
|
detail::conjunction<detail::is_usable_as_key_type<key_compare, key_type, KeyType>,
|
||||||
detail::is_constructible < T, V&& >::value, int > = 0 >
|
detail::is_constructible<T, V>>::value, int> = 0>
|
||||||
std::pair<iterator, bool> emplace(KeyType && key, V && t)
|
std::pair<iterator, bool> emplace(KeyType && key, V && t)
|
||||||
{
|
{
|
||||||
for (auto it = this->begin(); it != this->end(); ++it)
|
for (auto it = this->begin(); it != this->end(); ++it)
|
||||||
|
|||||||
Reference in new issue
Block a user