change compile only span test by adding new function to test ASM generation system

This commit is contained in:
Daniel Donenfeld 2019-02-27 15:48:18 -08:00
parent 0c46d039ac
commit d684a2cb96

View File

@ -28,7 +28,7 @@
// #include <stddef.h> // for ptrdiff_t // #include <stddef.h> // for ptrdiff_t
// #include <string> // for string // #include <string> // for string
// #include <type_traits> // for integral_constant<>::value, is_default_co... // #include <type_traits> // for integral_constant<>::value, is_default_co...
// #include <vector> // for vector #include <vector> // for vector
namespace gsl { namespace gsl {
struct fail_fast; struct fail_fast;
@ -54,3 +54,17 @@ bool foo()
return ret; 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;
}
}