mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
if constexpr instead of disallowed member specialization
This commit is contained in:
@@ -191,13 +191,12 @@
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
PyObject* operator()(const T& t) {
|
PyObject* operator()(const T& t) {
|
||||||
return pythonize(t);
|
if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<T>>, std::set<int>>) {
|
||||||
}
|
std::vector<int> vs(t.begin(), t.end());
|
||||||
|
return pythonize_vector(vs);
|
||||||
template <>
|
} else {
|
||||||
PyObject* operator()(const std::set<int>& t) {
|
return pythonize(t);
|
||||||
std::vector<int> vs(t.begin(), t.end());
|
}
|
||||||
return pythonize_vector(vs);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user