Skip to content

Commit cc70774

Browse files
committed
Fix msvc error C2908 in NamedObject definition
1 parent 0a17152 commit cc70774

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/luxrays/core/namedobjectvector.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ class NamedObjectVector {
109109
return std::move(oldDerivedPtr);
110110

111111
}
112+
113+
template<>
114+
NamedObjectUPtr DeleteObj<NamedObject>(const std::string &name);
112115

113116
void DeleteObjs(const std::vector<std::string> &names);
114117

@@ -180,8 +183,6 @@ std::tuple< NamedObject&, std::unique_ptr<NamedObject> >
180183
NamedObjectVector::DefineObj(std::unique_ptr<NamedObject>&& obj);
181184

182185

183-
template<>
184-
NamedObjectUPtr NamedObjectVector::DeleteObj(const std::string &name);
185186

186187
} // Namespace luxrays
187188

src/luxrays/core/namedobjectvector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ u_int NamedObjectVector::GetSize()const {
160160
//}
161161

162162
template<>
163-
NamedObjectUPtr NamedObjectVector::DeleteObj(const string &name) {
163+
NamedObjectUPtr NamedObjectVector::DeleteObj<NamedObject>(const string &name) {
164164
// We swap remove target and last object, and pop back
165165
if (objs.empty()) throw("Trying to delete an object in an empty container");
166166

0 commit comments

Comments
 (0)