Skip to content

Commit 91608ce

Browse files
committed
Fix std::map::value_type to match the type of the allocator
Some compilers require (via static_assert) that the type of the value match the type of the allocator value. In this case it does not matter whether either are const so we make the map value_type as such. Signed-off-by: Filip Jeremic <fjeremic@ca.ibm.com>
1 parent 856ca4a commit 91608ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/optimizer/LoadExtensions.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ class TR_LoadExtensions : public TR::Optimization
225225

226226
private:
227227

228-
typedef TR::typed_allocator<std::pair<const TR::Node*, int32_t>, TR::Region&> NodeToIntTableAllocator;
229-
typedef std::less<TR::Node*> NodeToIntTableComparator;
230-
typedef std::map<TR::Node*, int32_t, NodeToIntTableComparator, NodeToIntTableAllocator> NodeToIntTable;
228+
typedef TR::typed_allocator<std::pair<const TR::Node* const, int32_t>, TR::Region&> NodeToIntTableAllocator;
229+
typedef std::less<const TR::Node*> NodeToIntTableComparator;
230+
typedef std::map<const TR::Node*, int32_t, NodeToIntTableComparator, NodeToIntTableAllocator> NodeToIntTable;
231231

232232
/** \brief
233233
* Keeps track of all nodes which should be excluded from consideration in this optimization.

0 commit comments

Comments
 (0)