mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-08 05:16:25 +00:00
Fixes for gcc
This commit is contained in:
@@ -113,7 +113,7 @@ class IFC_PARSE_API Base {
|
||||
return T{};
|
||||
}
|
||||
} else if constexpr (std::is_same_v<Select, T>) {
|
||||
static_assert(false, "Select is abstract");
|
||||
static_assert(std::is_same_v<Select, T>, "Select is abstract");
|
||||
} else {
|
||||
if (declaration().is(T::Class())) {
|
||||
return T(data_weak());
|
||||
@@ -189,14 +189,14 @@ template <typename T, typename U>
|
||||
std::vector<T> cast_vector(const std::vector<U>& vs) {
|
||||
std::vector<T> result;
|
||||
for (const auto& v : vs) {
|
||||
if constexpr (std::is_base_of_v<T, U> || std::is_same_v<T, U>) {
|
||||
if constexpr (std::is_base_of_v<T, U>) {
|
||||
// For a base or identity transform we can just rely on static cast
|
||||
result.push_back(v);
|
||||
} else if constexpr (std::is_base_of_v<express::Select, U> && std::is_same_v<T, express::Base>) {
|
||||
// From a select to concrete we simply call the appropriate method
|
||||
result.push_back(v.concrete());
|
||||
} else {
|
||||
if (auto u = v.as<T>()) {
|
||||
if (auto u = v.template as<T>()) {
|
||||
result.push_back(u);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user