Changes to As<>() function in Format and a new Is<>() function #186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should resolved #130 and #131. It makes the following changes/additions:
Some tests are also added for Is<>().
Both in the new Is<>() function and the old As<>() function, std::remove_pointer is used to handle calls with pointers correctly as well. This is done to avoid a common misunderstanding (where the user calls the function with the pointer type, not the base type) and also done in some other libraries we reviewed. Unlike what I suggested in Decay in As<>() #131, std::decay is not used as it actually works differently then I thought.