/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2015 Microsoft Corporation. All rights reserved. // // This code is licensed under the MIT License (MIT). // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // /////////////////////////////////////////////////////////////////////////////// // #include // for byte // #include // for narrow_cast, at #include // for span, span_iterator, operator==, operator!= // #include // for array // #include // for ptrdiff_t // #include // for reverse_iterator, operator-, operator== // #include // for unique_ptr, shared_ptr, make_unique, allo... // #include // for match_results, sub_match, match_results<>... // #include // for ptrdiff_t // #include // for string // #include // for integral_constant<>::value, is_default_co... // #include // for vector namespace gsl { struct fail_fast; } // namespace gsl using namespace std; using namespace gsl; GSL_SUPPRESS(con.4) // NO-FORMAT: attribute bool foo() { { bool ret = true; span s; ret = ret || (s.size() == 0 && s.data() == nullptr); span cs; ret = ret || (cs.size() == 0 && cs.data() == nullptr); span s2{}; ret = ret || (s2.size() == 0 && s2.data() == nullptr); return ret; } }