Skip to content

Commit d006494

Browse files
committed
inline static
1 parent 8c01d02 commit d006494

2 files changed

Lines changed: 9 additions & 32 deletions

File tree

include/boost/openmethod/core.hpp

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -991,14 +991,14 @@ class method<Name(Parameters...), ReturnType, Policy>
991991
using return_type = ReturnType;
992992
using function_type = ReturnType (*)(detail::remove_virtual<Parameters>...);
993993

994-
static method fn;
994+
inline static method fn;
995+
996+
template<auto>
997+
inline static function_type next;
995998

996999
auto operator()(detail::remove_virtual<Parameters>... args) const
9971000
-> ReturnType;
9981001

999-
template<auto>
1000-
static function_type next;
1001-
10021002
private:
10031003
template<
10041004
auto Overrider, typename OverriderReturn,
@@ -1042,20 +1042,6 @@ class method<Name(Parameters...), ReturnType, Policy>
10421042
};
10431043
};
10441044

1045-
template<
1046-
typename Name, typename... Parameters, typename ReturnType, class Policy>
1047-
method<Name(Parameters...), ReturnType, Policy>
1048-
method<Name(Parameters...), ReturnType, Policy>::fn;
1049-
1050-
template<
1051-
typename Name, typename... Parameters, typename ReturnType, class Policy>
1052-
template<auto>
1053-
typename method<Name(Parameters...), ReturnType, Policy>::FunctionPointer
1054-
method<Name(Parameters...), ReturnType, Policy>::next;
1055-
1056-
template<typename T>
1057-
constexpr bool is_method = std::is_base_of_v<detail::method_info, T>;
1058-
10591045
template<
10601046
typename Name, typename... Parameters, typename ReturnType, class Policy>
10611047
method<Name(Parameters...), ReturnType, Policy>::method() {

include/boost/openmethod/policies/fast_perfect_hash.hpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ namespace policies {
2525
template<class Policy>
2626
class fast_perfect_hash : public type_hash {
2727

28-
static type_id hash_mult;
29-
static std::size_t hash_shift;
30-
static std::size_t hash_min;
31-
static std::size_t hash_max;
32-
28+
inline static type_id hash_mult;
29+
inline static std::size_t hash_shift;
30+
inline static std::size_t hash_min;
31+
inline static std::size_t hash_max;
32+
inline
3333
static void check(std::size_t index, type_id type);
3434

3535
public:
@@ -176,15 +176,6 @@ void fast_perfect_hash<Policy>::check(std::size_t index, type_id type) {
176176
}
177177
}
178178

179-
template<class Policy>
180-
type_id fast_perfect_hash<Policy>::hash_mult;
181-
template<class Policy>
182-
std::size_t fast_perfect_hash<Policy>::hash_shift;
183-
template<class Policy>
184-
std::size_t fast_perfect_hash<Policy>::hash_min;
185-
template<class Policy>
186-
std::size_t fast_perfect_hash<Policy>::hash_max;
187-
188179
} // namespace policies
189180
} // namespace boost::openmethod
190181

0 commit comments

Comments
 (0)