Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed from_bytes for std::map to use from_bytes_noalloc correctly
The compile error identified in issue #203 turned out to originate in SerializationSupport.hpp's implementation of from_bytes for maps: It called the from_bytes_noalloc function with three parameters, even though the third parameter always has a default value and doesn't need to be specified. Since it explicitly used a context_ptr<value_t> as the third parameter, this meant the compiler couldn't match the "const" version of the fron_bytes_noalloc function, which has a context_ptr<const T> as the third parameter, even though buf_ptr is a const char*. Removing the context_ptr parameter entirely allowed the compiler to select the correct from_bytes_noalloc version. This closes #203.
- Loading branch information