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;
};
namespace ircd
{
template<>
decltype(cl::work::allocator)
instance_list<cl::work>::allocator;
template<>
decltype(cl::work::list)
instance_list<cl::work>::list;
}
template<>
decltype(ircd::cl::work::list)
ircd::instance_list<ircd::cl::work>::list;
/// Queue profiling convenience
struct ircd::cl::work::prof

View file

@ -89,6 +89,10 @@ struct ircd::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
struct ircd::client::conf
{

View file

@ -179,3 +179,7 @@ struct ircd::db::database
static const database &get(const 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;
};
template<>
decltype(ircd::exec::list)
ircd::instance_list<ircd::exec>::list;
/// Exec options
///
struct ircd::exec::opts

View file

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

View file

@ -109,6 +109,10 @@ struct ircd::log::log
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.
/// Examples of hooks are stdout/stderr, and file logging. This hook does not
/// propagate exceptions and silently drops them. Listeners should not yield

View file

@ -68,6 +68,10 @@ struct ircd::m::acquire
~acquire() noexcept;
};
template<>
decltype(ircd::m::acquire::list)
ircd::instance_list<ircd::m::acquire>::list;
struct ircd::m::acquire::opts
{
/// 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();
};
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 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;
};
template<>
decltype(ircd::m::gossip::list)
ircd::instance_list<ircd::m::gossip>::list;
struct ircd::m::gossip::opts
{
/// 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;
};
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)
///
struct ircd::m::hook::base::site
@ -111,6 +115,10 @@ struct ircd::m::hook::base::site
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
template<>
struct ircd::m::hook::hook<void>

View file

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

View file

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

View file

@ -61,3 +61,7 @@ struct ircd::m::sync::item
item(const item &) = delete;
~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 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);
};
template<>
decltype(ircd::resource::map)
ircd::instance_map<ircd::string_view, ircd::resource, ircd::iless>::map;
#include "method.h"
#include "request.h"
#include "response.h"

View file

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