diff options
| author | nibbbl <63519528+nibbbl@users.noreply.github.com> | 2026-09-02 00:01:10 -0700 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-09-03 21:54:07 +0300 |
| commit | dc9c3b2a86cd465951a12bc9f7bc8c2d77ce151c (patch) | |
| tree | 882d1428f0bc3849156302adf487ef8fc978f789 /indra/llcommon/llinitparam.h | |
| parent | 8b60b254a737b88dfbc5a27e5e47bef96aed703e (diff) | |
Fix GCC 15+ build error in param block tag sorting
Fixes building the viewer with GCC 15 or newer: `llxuiparser.cpp` was
tripping `-Wsfinae-incomplete` via tag sorting templates in `llinitparam.h`.
Patched this by moving the tag check out of the types themselves.
Diffstat (limited to 'indra/llcommon/llinitparam.h')
| -rw-r--r-- | indra/llcommon/llinitparam.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index b220afadfc..0629f3ebae 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -45,7 +45,6 @@ namespace LLTypeTags template <typename INNER_TYPE, int _SORT_ORDER> struct TypeTagBase { - typedef void is_tag_t; typedef INNER_TYPE inner_t; static const int SORT_ORDER=_SORT_ORDER; }; @@ -68,18 +67,12 @@ namespace LLTypeTags typedef typename REST::template Cons<Swap<ITEM, typename REST::inner_t>::value_t>::value_t value_t; }; - template<typename T, typename SORTABLE = void> + template<typename T> struct IsSortable { static const bool value = false; }; - template<typename T> - struct IsSortable<T, typename T::is_tag_t> - { - static const bool value = true; - }; - template<typename ITEM, typename REST, bool IS_REST_SORTABLE = IsSortable<REST>::value> struct InsertInto { @@ -2830,5 +2823,26 @@ namespace LLInitParam }; } +namespace LLTypeTags +{ + // After BaseBlock so Sequential, Atomic, and Lazy are in scope. + template<typename T> + struct IsSortable<LLInitParam::BaseBlock::Sequential<T> > + { + static const bool value = true; + }; + + template<typename T> + struct IsSortable<LLInitParam::BaseBlock::Atomic<T> > + { + static const bool value = true; + }; + + template<typename T, typename BLOCK_T> + struct IsSortable<LLInitParam::BaseBlock::Lazy<T, BLOCK_T> > + { + static const bool value = true; + }; +} #endif // LL_LLPARAM_H |
