ArgumentParserTypes: implement a workaround for EDG 6 assertion failure

While building CMake on EDG 603+-based compiler, such as LCC 1.27.x,
an internal assertion failure may be experienced with a message like
'assertion failed at: "il.c", line 15635 in i_copy_dynamic_init'.

This commit introduces a workaround that helps avoiding this.

Workaround is enabled only for LCC based on this EDG frontend,
it is not known if it is needed for any other compilers, since
there were none found based on EDG 603 and later and having this bug.
This commit is contained in:
makise-homura
2025-01-14 20:33:50 +03:00
parent d3edb67134
commit a438a0460a

View File

@@ -21,6 +21,13 @@ struct Maybe<std::string> : public std::string
template <typename T> template <typename T>
struct MaybeEmpty; struct MaybeEmpty;
# if defined(__LCC__) && (__EDG_VERSION__ >= 603)
template <>
struct MaybeEmpty<std::vector<std::string>> : public std::vector<std::string>
{
using std::vector<std::string>::vector;
};
# endif
template <typename T> template <typename T>
struct MaybeEmpty<std::vector<T>> : public std::vector<T> struct MaybeEmpty<std::vector<T>> : public std::vector<T>
{ {