Skip to content

Instantly share code, notes, and snippets.

@jkoenen
Created March 28, 2019 17:39
Show Gist options
  • Select an option

  • Save jkoenen/2616e5e44d2bd0b5fa17f641faf02d9f to your computer and use it in GitHub Desktop.

Select an option

Save jkoenen/2616e5e44d2bd0b5fa17f641faf02d9f to your computer and use it in GitHub Desktop.
struct StaticStringView
{
inline operator StringView() const;
inline ConstMemoryBlock getMemory() const;
inline const char* getStart() const;
inline size_t getSize() const;
const char* pStart;
size_t size;
};
constexpr StaticStringView operator "" _s( const char* pString, size_t length )
{
return StaticStringView{ pString, length };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment