Closed
Description
openedon Jun 18, 2018
Since 2fc94db, this program does not work anymore without explicit cast to not_null (here tested with clang 5.0.2 on linux with -std=c++14):
#include <gsl/pointers>
#include <iostream>
void f(gsl::not_null<const int *> i) {
std::cout << *i << '\n';
}
int main() {
int i = 42;
f(&i); // no matching function for call to 'f'
// note: candidate function not viable: no known conversion from 'int *' to 'gsl::not_null<const int *>' for 1st argument
return 0;
}
If this is really wanted, could you explain why?
Kind regards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels