mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
change compile only span test by adding new function to test ASM generation system
This commit is contained in:
parent
0c46d039ac
commit
d684a2cb96
@ -28,7 +28,7 @@
|
||||
// #include <stddef.h> // for ptrdiff_t
|
||||
// #include <string> // for string
|
||||
// #include <type_traits> // for integral_constant<>::value, is_default_co...
|
||||
// #include <vector> // for vector
|
||||
#include <vector> // for vector
|
||||
|
||||
namespace gsl {
|
||||
struct fail_fast;
|
||||
@ -54,3 +54,17 @@ bool foo()
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
|
||||
bool bar()
|
||||
{
|
||||
{
|
||||
bool ret = true;
|
||||
vector<int> v{0,1,2,3};
|
||||
span<int> s{v};
|
||||
ret = ret || (s.size() == 4 && s.data() != nullptr);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user