mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-24 04:20:21 +00:00
Removed StackBuffer::operator[] to remove MSVC overloading ambiguity error
- removed operator[] -- now rely on (TYPE*)[] - added comments regarding reliance on implicit casting
This commit is contained in:
parent
1f2d12f496
commit
bae35a9f1e
@ -59,8 +59,10 @@ public:
|
||||
~StackBuffer();
|
||||
|
||||
public:
|
||||
TYPE & operator[](size_type index) { return _data[index]; }
|
||||
TYPE const & operator[](size_type index) const { return _data[index]; }
|
||||
// Note the reliance on implicit casting so that it can be used similar to
|
||||
// a VLA. This removes the need for operator[] as the resulting TYPE* will
|
||||
// natively support []. (The presence of both TYPE* and operator[] also
|
||||
// causes an ambiguous overloading error with 32-bit MSVC builds.)
|
||||
|
||||
operator TYPE const * () const { return _data; }
|
||||
operator TYPE * () { return _data; }
|
||||
|
Loading…
Reference in New Issue
Block a user