0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd::util: Fix undefined-var-template linkage related warning.

This commit is contained in:
Jason Volk 2022-07-20 12:03:10 -07:00
parent 065343069a
commit 5d71d848a7
3 changed files with 22 additions and 21 deletions

View file

@ -41,6 +41,17 @@ struct ircd::cl::work
~work() noexcept; ~work() noexcept;
}; };
namespace ircd
{
template<>
decltype(cl::work::allocator)
instance_list<cl::work>::allocator;
template<>
decltype(cl::work::list)
instance_list<cl::work>::list;
}
/// Queue profiling convenience /// Queue profiling convenience
struct ircd::cl::work::prof struct ircd::cl::work::prof
:std::array<nanoseconds, 5> :std::array<nanoseconds, 5>

View file

@ -131,6 +131,17 @@ struct ircd::run::changed
static void wait(const std::initializer_list<enum level> &); static void wait(const std::initializer_list<enum level> &);
}; };
namespace ircd
{
template<>
decltype(run::changed::allocator)
instance_list<run::changed>::allocator;
template<>
decltype(run::changed::list)
instance_list<run::changed>::list;
}
/// Tool to yield a context until the run::level is RUN or QUIT. Once either is /// Tool to yield a context until the run::level is RUN or QUIT. Once either is
/// satisfied (or if already satisfied) the run::level is checked to be RUN /// satisfied (or if already satisfied) the run::level is checked to be RUN
/// otherwise an exception is thrown. /// otherwise an exception is thrown.

View file

@ -54,10 +54,6 @@ struct ircd::util::instance_list
~instance_list() noexcept; ~instance_list() noexcept;
}; };
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-var-template"
#endif __clang__
template<class T> template<class T>
ircd::util::instance_list<T>::instance_list() ircd::util::instance_list<T>::instance_list()
{ {
@ -66,14 +62,7 @@ ircd::util::instance_list<T>::instance_list()
it = list.emplace(end(list), static_cast<T *>(this)); it = list.emplace(end(list), static_cast<T *>(this));
list.get_allocator().s->next = nullptr; list.get_allocator().s->next = nullptr;
} }
#ifdef __clang__
#pragma clang diagnostic pop
#endif __clang__
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-var-template"
#endif __clang__
template<class T> template<class T>
ircd::util::instance_list<T>::instance_list(instance_list &&other) ircd::util::instance_list<T>::instance_list(instance_list &&other)
noexcept noexcept
@ -83,14 +72,7 @@ noexcept
it = list.emplace(end(list), static_cast<T *>(this)); it = list.emplace(end(list), static_cast<T *>(this));
list.get_allocator().s->next = nullptr; list.get_allocator().s->next = nullptr;
} }
#ifdef __clang__
#pragma clang diagnostic pop
#endif __clang__
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-var-template"
#endif __clang__
template<class T> template<class T>
ircd::util::instance_list<T>::instance_list(const instance_list &other) ircd::util::instance_list<T>::instance_list(const instance_list &other)
{ {
@ -99,9 +81,6 @@ ircd::util::instance_list<T>::instance_list(const instance_list &other)
it = list.emplace(end(list), static_cast<T *>(this)); it = list.emplace(end(list), static_cast<T *>(this));
list.get_allocator().s->next = nullptr; list.get_allocator().s->next = nullptr;
} }
#ifdef __clang__
#pragma clang diagnostic pop
#endif __clang__
template<class T> template<class T>
ircd::util::instance_list<T> & ircd::util::instance_list<T> &