Skip to content

Commit 39a2767

Browse files
committed
inline static vs msvc
1 parent a6acea9 commit 39a2767

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

include/boost/openmethod/core.hpp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@ class method<Id, ReturnType(Parameters...), Registry>
19741974
//!
19751975
//! The only instance of `method`. Its `operator()` is used to call
19761976
//! the method.
1977-
static method fn;
1977+
inline static method fn;
19781978

19791979
//! Call the method
19801980
//!
@@ -2191,32 +2191,6 @@ class method<Id, ReturnType(Parameters...), Registry>
21912191
};
21922192
};
21932193

2194-
// Following cannot be `inline static` becaused of MSVC (19.43) bug causing a
2195-
// "no appropriate default constructor available". Try this in CE:
2196-
//
2197-
// template<typename>
2198-
// class method {
2199-
// method();
2200-
// method(const method&) = delete;
2201-
// method(method&&) = delete;
2202-
// ~method();
2203-
// public:
2204-
// static inline method instance;
2205-
// };
2206-
// template method<void>;
2207-
// https://godbolt.org/z/GzEn486P7
2208-
2209-
template<
2210-
typename Id, typename... Parameters, typename ReturnType, class Registry>
2211-
method<Id, ReturnType(Parameters...), Registry>
2212-
method<Id, ReturnType(Parameters...), Registry>::fn;
2213-
2214-
// template<
2215-
// typename Id, typename... Parameters, typename ReturnType, class Registry>
2216-
// template<auto>
2217-
// typename method<Id, ReturnType(Parameters...), Registry>::FunctionPointer
2218-
// method<Id, ReturnType(Parameters...), Registry>::next;
2219-
22202194
template<
22212195
typename Id, typename... Parameters, typename ReturnType, class Registry>
22222196
method<Id, ReturnType(Parameters...), Registry>::method() {

0 commit comments

Comments
 (0)