0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-24 14:34:00 +01:00

Fix undef var templates for explicit instantiations across units (-Wundefined-var-template).

This commit is contained in:
Jason Volk 2023-02-02 23:33:32 -08:00
parent d3a125f1d5
commit ea40dcc56b
17 changed files with 71 additions and 10 deletions

View file

@ -41,16 +41,9 @@ struct ircd::cl::work
~work() noexcept; ~work() noexcept;
}; };
namespace ircd template<>
{ decltype(ircd::cl::work::list)
template<> ircd::instance_list<ircd::cl::work>::list;
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

View file

@ -89,6 +89,10 @@ struct ircd::client
friend const ipport &local(const client &); friend const ipport &local(const client &);
}; };
template<>
decltype(ircd::client::map)
ircd::instance_multimap<ircd::net::ipport, ircd::client, ircd::net::ipport::cmp_ip>::map;
/// Confs can be attached to individual clients to change their behavior /// Confs can be attached to individual clients to change their behavior
struct ircd::client::conf struct ircd::client::conf
{ {

View file

@ -179,3 +179,7 @@ struct ircd::db::database
static const database &get(const column &); static const database &get(const column &);
static database &get(column &); static database &get(column &);
}; };
template<>
decltype(ircd::db::database::list)
ircd::instance_list<ircd::db::database>::list;

View file

@ -70,6 +70,10 @@ struct ircd::exec
~exec() noexcept; ~exec() noexcept;
}; };
template<>
decltype(ircd::exec::list)
ircd::instance_list<ircd::exec>::list;
/// Exec options /// Exec options
/// ///
struct ircd::exec::opts struct ircd::exec::opts

View file

@ -51,6 +51,10 @@ struct ircd::ios::descriptor
~descriptor() noexcept; ~descriptor() noexcept;
}; };
template<>
decltype(ircd::ios::descriptor::list)
ircd::instance_list<ircd::ios::descriptor>::list;
/// Statistics for the descriptor. /// Statistics for the descriptor.
struct ircd::ios::descriptor::stats struct ircd::ios::descriptor::stats
{ {

View file

@ -109,6 +109,10 @@ struct ircd::log::log
static log *find(const char &snote); static log *find(const char &snote);
}; };
template<>
decltype(ircd::log::log::list)
ircd::instance_list<ircd::log::log>::list;
/// log::hook is used by the receivers of messages; this is a extern singleton. /// log::hook is used by the receivers of messages; this is a extern singleton.
/// Examples of hooks are stdout/stderr, and file logging. This hook does not /// Examples of hooks are stdout/stderr, and file logging. This hook does not
/// propagate exceptions and silently drops them. Listeners should not yield /// propagate exceptions and silently drops them. Listeners should not yield

View file

@ -68,6 +68,10 @@ struct ircd::m::acquire
~acquire() noexcept; ~acquire() noexcept;
}; };
template<>
decltype(ircd::m::acquire::list)
ircd::instance_list<ircd::m::acquire>::list;
struct ircd::m::acquire::opts struct ircd::m::acquire::opts
{ {
/// Room apropos; note that the event_id in this structure may have some /// Room apropos; note that the event_id in this structure may have some

View file

@ -46,3 +46,7 @@ struct ircd::m::app
static void init(), fini(); static void init(), fini();
}; };
template<>
decltype(ircd::m::app::list)
ircd::instance_list<ircd::m::app>::list;

View file

@ -81,3 +81,7 @@ struct ircd::m::fed::well_known::request
char tgtbuf[2][rfc3986::REMOTE_BUFSIZE]; char tgtbuf[2][rfc3986::REMOTE_BUFSIZE];
char buf[15_KiB]; char buf[15_KiB];
}; };
template<>
decltype(ircd::m::fed::well_known::request::list)
ircd::instance_list<ircd::m::fed::well_known::request>::list;

View file

@ -51,6 +51,10 @@ struct ircd::m::gossip
~gossip() noexcept; ~gossip() noexcept;
}; };
template<>
decltype(ircd::m::gossip::list)
ircd::instance_list<ircd::m::gossip>::list;
struct ircd::m::gossip::opts struct ircd::m::gossip::opts
{ {
/// Room apropos; when room.event_id is true, only that event will be /// Room apropos; when room.event_id is true, only that event will be

View file

@ -78,6 +78,10 @@ struct ircd::m::hook::base
virtual ~base() noexcept; virtual ~base() noexcept;
}; };
template<>
decltype(ircd::m::hook::base::list)
ircd::instance_list<ircd::m::hook::base>::list;
/// Non-template base class for all hook sites (dispatcher/caller component) /// Non-template base class for all hook sites (dispatcher/caller component)
/// ///
struct ircd::m::hook::base::site struct ircd::m::hook::base::site
@ -111,6 +115,10 @@ struct ircd::m::hook::base::site
virtual ~site() noexcept; virtual ~site() noexcept;
}; };
template<>
decltype(ircd::m::hook::base::site::list)
ircd::instance_list<ircd::m::hook::base::site>::list;
/// Hook function with no payload; only an m::event argument /// Hook function with no payload; only an m::event argument
template<> template<>
struct ircd::m::hook::hook<void> struct ircd::m::hook::hook<void>

View file

@ -54,6 +54,10 @@ struct ircd::m::push::request
char buf[15_KiB]; char buf[15_KiB];
}; };
template<>
decltype(ircd::m::push::request::list)
ircd::instance_list<ircd::m::push::request>::list;
struct ircd::m::push::match struct ircd::m::push::match
:boolean :boolean
{ {

View file

@ -118,6 +118,10 @@ struct ircd::m::sync::data
~data() noexcept; ~data() noexcept;
}; };
template<>
decltype(ircd::m::sync::data::list)
ircd::instance_list<ircd::m::sync::data>::list;
inline bool inline bool
ircd::m::sync::apropos(const data &d, ircd::m::sync::apropos(const data &d,
const event &event) const event &event)

View file

@ -61,3 +61,7 @@ struct ircd::m::sync::item
item(const item &) = delete; item(const item &) = delete;
~item() noexcept; ~item() noexcept;
}; };
template<>
decltype(ircd::m::sync::item::map)
ircd::instance_multimap<std::string, ircd::m::sync::item, std::less<>>::map;

View file

@ -106,3 +106,7 @@ struct ircd::m::vm::eval
static eval *seqmin(); static eval *seqmin();
static void seqsort(); static void seqsort();
}; };
template<>
decltype(ircd::m::vm::eval::list)
ircd::instance_list<ircd::m::vm::eval>::list;

View file

@ -60,6 +60,10 @@ struct ircd::resource
static resource &find(const string_view &path); static resource &find(const string_view &path);
}; };
template<>
decltype(ircd::resource::map)
ircd::instance_map<ircd::string_view, ircd::resource, ircd::iless>::map;
#include "method.h" #include "method.h"
#include "request.h" #include "request.h"
#include "response.h" #include "response.h"

View file

@ -75,3 +75,7 @@ struct ircd::ctx::ctx
ctx &operator=(const ctx &) = delete; ctx &operator=(const ctx &) = delete;
~ctx() noexcept; ~ctx() noexcept;
}; };
template<>
decltype(ircd::ctx::ctx::list)
ircd::util::instance_list<ircd::ctx::ctx>::list;