File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,11 @@ class NamedObjectVector {
102102 template <typename T>
103103 std::unique_ptr<T> DeleteObj (const std::string &name);
104104
105+ // Workaround for gcc bug 85282 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282)
106+ #ifndef __GNUG__
105107 template <> // Specialization for NamedObject; other types will rely on it
106108 std::unique_ptr<NamedObject> DeleteObj<NamedObject>(const std::string &name);
109+ #endif
107110
108111 void DeleteObjs (const std::vector<std::string> &names);
109112
@@ -169,13 +172,20 @@ class NamedObjectVector {
169172};
170173
171174
172-
173175// Specialization (declaration) of DefineObj for NamedObject class, so that
174176// derived classes can rely on it
175177template <>
176178std::tuple< NamedObject&, std::unique_ptr<NamedObject> >
177179NamedObjectVector::DefineObj (std::unique_ptr<NamedObject>&& obj);
178180
181+
182+ // Workaround for gcc bug 85282 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282)
183+ #ifdef __GNUG__
184+ template <> // Specialization for NamedObject; other types will rely on it
185+ std::unique_ptr<NamedObject>
186+ NamedObjectVector::DeleteObj<NamedObject>(const std::string &name);
187+ #endif
188+
179189// Out-of-class definition for DeleteObj
180190template <typename T>
181191std::unique_ptr<T> NamedObjectVector::DeleteObj (const std::string &name) {
@@ -186,6 +196,7 @@ std::unique_ptr<T> NamedObjectVector::DeleteObj(const std::string &name) {
186196 return std::move (oldDerivedPtr);
187197}
188198
199+
189200} // Namespace luxrays
190201
191202#endif /* _LUXRAYS_NAMEDOBJECTVECTOR_H */
You can’t perform that action at this time.
0 commit comments