Opened 15 years ago
Closed 15 years ago
#1101 closed Bugs (fixed)
[MPI] Const-incorrectness in boost::mpi::status
Reported by: | daniel_kruegler | Owned by: | Douglas Gregor |
---|---|---|---|
Milestone: | To Be Determined | Component: | mpi |
Version: | Severity: | Problem | |
Keywords: | Cc: |
Description
There are two member functions in class boost::mpi::status which lack const qualifications although they are immutable:
(a) bool cancelled(): The documentation says: "Determine whether the communication associated with this object has been successfully cancelled." The implementation delegates to MPI_Test_cancelled, which according to the internet documentation does use it's MPI_Status* argument is IN parameter.
(b) template<typename T> optional<int> count(): Here also the docs don't imply a mutable operation. The implementation delegates (under some circumstances) to MPI_Get_count, which also does not modify MPI_Status from a user perspective. The same function *caches* the result in the data member m_count, but this is the classic example where this member should be declared mutable therefore.
Change History (2)
comment:1 by , 15 years ago
Component: | None → mpi |
---|---|
Owner: | set to |
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [39052]) Constify status::count and status::cancelled. Fixes #1101