Added support for predefining preprocessor defines before parsing strings of code.
This prevents issues for preprocessor defines not getting treated properly for specific circumstances (such as macro wrappers for specifiers).
This commit is contained in:
1 parent
be023325a9
commit
772db608be
6 files changed
+57
-18
No files matched your search
@@ -5,6 +5,14 @@
|
||||
|
||||
#pragma region Containers
|
||||
|
||||
template<class TType> struct RemoveConst { typedef TType Type; };
|
||||
template<class TType> struct RemoveConst<const TType> { typedef TType Type; };
|
||||
template<class TType> struct RemoveConst<const TType[]> { typedef TType Type[]; };
|
||||
template<class TType, uw Size> struct RemoveConst<const TType[Size]> { typedef TType Type[Size]; };
|
||||
|
||||
template<class TType>
|
||||
using TRemoveConst = typename RemoveConst<TType>::Type;
|
||||
|
||||
template<class Type>
|
||||
struct Array
|
||||
{
|
||||
@@ -167,7 +175,8 @@ struct Array
|
||||
|
||||
Header* get_header( void )
|
||||
{
|
||||
return rcast( Header*, Data ) - 1 ;
|
||||
using NonConstType = TRemoveConst< Type >;
|
||||
return rcast( Header*, const_cast<NonConstType*>(Data) ) - 1 ;
|
||||
}
|
||||
|
||||
bool grow( uw min_capacity )
|
||||
|
||||
Reference in new issue
Block a user