Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/juce_core/text/juce_CharPointer_ASCII.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ class CharPointer_ASCII final
public:
using CharType = char;

// Standard iterator traits for compatibility with STL algorithms
using difference_type = std::ptrdiff_t;
using value_type = juce_wchar;
using pointer = juce_wchar*;
using reference = juce_wchar; // Returns by value since operator*() decodes to juce_wchar
using iterator_category = std::input_iterator_tag;

explicit CharPointer_ASCII (const CharType* rawPointer) noexcept
: data (const_cast<CharType*> (rawPointer))
{
Expand Down
7 changes: 7 additions & 0 deletions modules/juce_core/text/juce_CharPointer_UTF16.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ class CharPointer_UTF16 final
using CharType = int16;
#endif

// Standard iterator traits for compatibility with STL algorithms
using difference_type = std::ptrdiff_t;
using value_type = juce_wchar;
using pointer = juce_wchar*;
using reference = juce_wchar; // Returns by value since this is a proxy iterator
using iterator_category = std::input_iterator_tag;

explicit CharPointer_UTF16 (const CharType* rawPointer) noexcept
: data (const_cast<CharType*> (rawPointer))
{
Expand Down
7 changes: 7 additions & 0 deletions modules/juce_core/text/juce_CharPointer_UTF32.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ class CharPointer_UTF32 final
public:
using CharType = juce_wchar;

// Standard iterator traits for compatibility with STL algorithms
using difference_type = std::ptrdiff_t;
using value_type = juce_wchar;
using pointer = juce_wchar*;
using reference = juce_wchar; // Returns by value for consistency across CharPointer types
using iterator_category = std::input_iterator_tag;

explicit CharPointer_UTF32 (const CharType* rawPointer) noexcept
: data (const_cast<CharType*> (rawPointer))
{
Expand Down
7 changes: 7 additions & 0 deletions modules/juce_core/text/juce_CharPointer_UTF8.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ class CharPointer_UTF8 final
public:
using CharType = char;

// Standard iterator traits for compatibility with STL algorithms
using value_type = juce_wchar;
using pointer = juce_wchar*;
using reference = juce_wchar; // Note: returns by value since this is a proxy iterator
using iterator_category = std::input_iterator_tag;
using difference_type = std::ptrdiff_t;

explicit CharPointer_UTF8 (const CharType* rawPointer) noexcept
: data (const_cast<CharType*> (rawPointer))
{
Expand Down