-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault on G++ when trying to assign json string literal to custom json type. #972
Comments
Out of curiosity: does it work without fifo_map? |
Do you mean |
I'll check tonight. |
Do you have a stack trace? Does it happen with just the assignment line, or does it require the |
|
Just thought that if you had it handy, we might be able to see something before Niels gets to look at it tonight. |
When I call The error can be reduced to an assignment from #include "json.hpp"
#include "fifo_map.hpp"
template<class K, class V, class dummy_compare, class A>
using my_workaround_fifo_map = nlohmann::fifo_map<K, V, nlohmann::fifo_map_compare<K>, A>;
using my_json = nlohmann::basic_json<my_workaround_fifo_map>;
int main()
{
nlohmann::json x = 1;
my_json y = x;
} |
I think the problem is that the copy constructor/assignment operator/whatever thinks assigning a |
In #986 there is a fix for a related issue. Maybe it also helps here. |
With PR #986, the original code example compiles and runs without issues. Output is |
Fixed with #986. |
Bug Report
This is the minimal code demonstrating the problem.
The text was updated successfully, but these errors were encountered: