/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2022, Danny Robson */ #pragma once #include #include #include namespace cruft::concepts { /// A literal c-string character array. template concept c_string = std::is_array_v> and std::is_same_v< std::remove_cvref_t< std::remove_all_extents_t< std::remove_cvref_t > >, char >; /// A type that behaves like a string. ie, a sequence of characters template concept stringy = std::same_as or std::same_as or std::same_as or std::same_as or c_string; /// A type that behaves like a string _and_ has a null terminator template concept null_stringy = std::same_as or std::same_as or std::same_as; }