-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Link error when using find() on the latest commit #814
Comments
This should work too:
This way also results in only a single allocation per run instead of an allocation every time that find is called (though the allocation itself will probably be skipped due to the small string optimization here, it may not for larger strings). What is the link error? |
@gregmarr - C++ doesn't allow initialization of non-const members in line. The only way to initialize a string is to use char*. So the other option that will work to explicitly convert char* to string.
The link error is
|
Did you try adding the |
Yes it still gives the same error. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am working on the develop branch.
I have a class defining the Json field constants.
I pass in the constant value into find which throws the link error.
However it works if I wrap the name in std::forward eg
j.find(std::forward<std::string>(JsonFields::ID))
This worked in commit 1b1bd0e but is broken in later commits. The change that introduced this issue is commit 6c9a401 .
The text was updated successfully, but these errors were encountered: