diff --git a/include/ircd/portable.h b/include/ircd/portable.h index 5eb727369..e1f34c54c 100644 --- a/include/ircd/portable.h +++ b/include/ircd/portable.h @@ -12,6 +12,7 @@ // Portability Macros & Developer Tools // +#pragma once #define HAVE_IRCD_PORTABLE_H // diff --git a/include/ircd/spirit.h b/include/ircd/spirit.h index 6d1eb04d1..2e9fb2959 100644 --- a/include/ircd/spirit.h +++ b/include/ircd/spirit.h @@ -11,12 +11,12 @@ #ifndef HAVE_IRCD_SPIRIT_H #define HAVE_IRCD_SPIRIT_H -/// This file is not part of the IRCd standard include list (stdinc.h) because -/// it involves extremely expensive boost headers for creating formal spirit -/// grammars. Include this in a definition file which defines such grammars. -/// -/// Note that directly sharing elements of a grammar between two compilation -/// units can be achieved with forward declarations in `ircd/grammar.h`. +// This file is not part of the IRCd standard include list (stdinc.h) because +// it involves extremely expensive boost headers for creating formal spirit +// grammars. Include this in a definition file which defines such grammars. +// +// Note that directly sharing elements of a grammar between two compilation +// units can be achieved with forward declarations in `ircd/grammar.h`. // ircd.h is included here so that it can be compiled into this header. Then // this becomes the single leading precompiled header. diff --git a/include/ircd/spirit/char.h b/include/ircd/spirit/char.h index 92968e75b..bd815b6ec 100644 --- a/include/ircd/spirit/char.h +++ b/include/ircd/spirit/char.h @@ -8,6 +8,9 @@ // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. +#pragma once +#define HAVE_IRCD_SPIRIT_CHAR_H + #if defined(__clang__) template struct [[clang::internal_linkage, gnu::visibility("internal")]] diff --git a/include/ircd/spirit/generate.h b/include/ircd/spirit/generate.h index e0c830393..df4e4c0af 100644 --- a/include/ircd/spirit/generate.h +++ b/include/ircd/spirit/generate.h @@ -8,11 +8,12 @@ // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. +#pragma once #define HAVE_IRCD_SPIRIT_GENERATE_H -/// This file is not part of the IRCd standard include list (stdinc.h) because -/// it involves extremely expensive boost headers for creating formal spirit -/// grammars. This file is automatically included in the spirit.h group. +// This file is not part of the IRCd standard include list (stdinc.h) because +// it involves extremely expensive boost headers for creating formal spirit +// grammars. This file is automatically included in the spirit.h group. namespace ircd { namespace spirit diff --git a/include/ircd/spirit/parse.h b/include/ircd/spirit/parse.h index 3c4ba926a..648a7794c 100644 --- a/include/ircd/spirit/parse.h +++ b/include/ircd/spirit/parse.h @@ -11,6 +11,10 @@ #pragma once #define HAVE_IRCD_SPIRIT_PARSE_H +// This file is not part of the IRCd standard include list (stdinc.h) because +// it involves extremely expensive boost headers for creating formal spirit +// grammars. This file is automatically included in the spirit.h group. + namespace ircd { namespace spirit __attribute__((visibility("internal"))) diff --git a/include/ircd/spirit/spirit.h b/include/ircd/spirit/spirit.h index d0079154b..1bc6775a8 100644 --- a/include/ircd/spirit/spirit.h +++ b/include/ircd/spirit/spirit.h @@ -42,9 +42,11 @@ __attribute__((visibility("internal"))) using spirit::inf; using qi::locals; - using qi::_a; using qi::_a_type; using qi::_r1_type; + using qi::attr_cast; + using qi::attr; + using qi::_a; using qi::raw; using qi::omit; using qi::matches; @@ -52,8 +54,6 @@ __attribute__((visibility("internal"))) using qi::eoi; using qi::eps; using qi::expect; - using qi::attr; - using qi::attr_cast; using qi::repeat; using qi::lit; using qi::char_; @@ -84,17 +84,25 @@ __attribute__((visibility("internal"))) using qi::little_bin_double; using spirit::repository::qi::seek; + using karma::attr_cast; using karma::lit; using karma::char_; using karma::long_; using karma::double_; using karma::bool_; using karma::eps; - using karma::attr_cast; using karma::maxwidth; using karma::buffer; using karma::skip; + namespace local + { + using qi::_0; + using qi::_1; + using qi::_2; + using qi::_3; + } + template auto & @@ -106,14 +114,6 @@ __attribute__((visibility("internal"))) local_at(semantic_context&&); }} -namespace ircd::spirit::local -{ - using qi::_0; - using qi::_1; - using qi::_2; - using qi::_3; -} - template inline auto &