Fix compilation failure of regression test for #3077 on ICPC

This commit is contained in:
Florian Albrechtskirchinger 2022-05-01 14:47:53 +02:00
parent 554dfb038f
commit d113f118ce
No known key found for this signature in database
GPG Key ID: 19618CE9B2D4BE6D
2 changed files with 16 additions and 2 deletions

View File

@ -347,8 +347,15 @@ struct is_compatible_string_type
template<typename BasicJsonType, typename ConstructibleStringType>
struct is_constructible_string_type
{
// launder type through decltype() to fix compilation failure on ICPC
#ifdef __INTEL_COMPILER
using laundered_type = decltype(std::declval<ConstructibleStringType>());
#else
using laundered_type = ConstructibleStringType;
#endif
static constexpr auto value =
is_constructible<ConstructibleStringType,
is_constructible<laundered_type,
typename BasicJsonType::string_t>::value;
};

View File

@ -3482,8 +3482,15 @@ struct is_compatible_string_type
template<typename BasicJsonType, typename ConstructibleStringType>
struct is_constructible_string_type
{
// launder type through decltype() to fix compilation failure on ICPC
#ifdef __INTEL_COMPILER
using laundered_type = decltype(std::declval<ConstructibleStringType>());
#else
using laundered_type = ConstructibleStringType;
#endif
static constexpr auto value =
is_constructible<ConstructibleStringType,
is_constructible<laundered_type,
typename BasicJsonType::string_t>::value;
};