A C++ wrapper for the basic C datatypes defined by the pEpEngine.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
610 B

  1. // This file is under GNU General Public License 3.0
  2. // see LICENSE.txt
  3. #ifndef PEP_DATATYPES_STRING_VIEW_HH
  4. #define PEP_DATATYPES_STRING_VIEW_HH
  5. #include <string_view>
  6. namespace pEp
  7. {
  8. template<class CharT>
  9. using basic_string_view = std::basic_string_view<CharT>;
  10. typedef std::string_view string_view;
  11. typedef std::u16string_view u16string_view;
  12. typedef std::u32string_view u32string_view;
  13. }
  14. namespace pEp
  15. {
  16. constexpr
  17. string_view operator""_sv(const char* s, size_t sz) noexcept
  18. {
  19. return string_view(s,sz);
  20. }
  21. }
  22. #endif // PEP_DATATYPES_STRING_VIEW_HH