0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd: Forward declare missing karma::rule; ensure visibility of public rules.

This commit is contained in:
Jason Volk 2022-06-24 11:15:13 -07:00
parent c0b011d5c0
commit aff1b3436e
2 changed files with 19 additions and 5 deletions

View file

@ -30,5 +30,15 @@ namespace boost::spirit::qi
class T2,
class T3,
class T4>
struct rule;
struct [[gnu::visibility("default")]] rule;
}
namespace boost::spirit::karma
{
template<class it,
class T1,
class T2,
class T3,
class T4>
struct [[gnu::visibility("default")]] rule;
}

View file

@ -84,14 +84,18 @@ struct ircd::rfc3986::uri
// which take a reference to any apropos rule. To avoid exposure of
// boost::spirit in project headers these types are carefully crafted thin forward
// declarations, so spirit itself is not included here.
#pragma GCC visibility push(default)
namespace ircd::rfc3986::parser
{
using unused = boost::spirit::unused_type;
template<class R = unused>
using rule = boost::spirit::qi::rule<const char *, R, unused, unused, unused>;
template<class T = unused>
struct [[gnu::visibility("default")]] rule
:boost::spirit::qi::rule<const char *, T, unused, unused, unused>
{
using boost::spirit::qi::rule<const char *, T, unused, unused, unused>::rule;
};
#pragma GCC visibility push(default)
extern const rule<> sub_delims;
extern const rule<> gen_delims;
extern const rule<> reserved;
@ -149,8 +153,8 @@ namespace ircd::rfc3986::parser
extern const rule<> absolute_uri;
extern const rule<> uri;
extern const rule<> uri_ref; // uri | relative_ref
#pragma GCC visibility pop
}
#pragma GCC visibility pop
// Validator suite
namespace ircd::rfc3986