hpx/util/insert_checked.hpp#

Defined in header hpx/util/insert_checked.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace util

Functions

template<typename Iterator>
constexpr bool insert_checked(std::pair<Iterator, bool> const &r) noexcept#

Helper function for writing predicates that test whether an std::map insertion succeeded. This inline template function negates the need to explicitly write the sometimes lengthy std::pair<Iterator, bool> type.

Parameters

r – [in] The return value of a std::map insert operation.

Returns

This function returns r.second.

template<typename Iterator>
bool insert_checked(std::pair<Iterator, bool> const &r, Iterator &it)#

Helper function for writing predicates that test whether an std::map insertion succeeded. This inline template function negates the need to explicitly write the sometimes lengthy std::pair<Iterator, bool> type.

Parameters
  • r – [in] The return value of a std::map insert operation.

  • r – [out] A reference to an Iterator, which is set to r.first.

  • it – [out] on exit, will hold the iterator referring to the inserted element

Returns

This function returns r.second.