Boost 使用xp::sregex::compile时regex_byref_matcher.hpp的路径

Boost 使用xp::sregex::compile时regex_byref_matcher.hpp的路径,boost,compilation,boost-xpressive,Boost,Compilation,Boost Xpressive,我注意到,当我在代码中使用xp::sregex::compile时,字符串…\3rdparty\boost-1\u 58\boost/xpressive/detail/core/matcher/regex\u byref\u matcher.hpp(带有我的本地路径)会出现在发布mods中编译的二进制代码中。 有办法删除它吗?当代码使用\uuuu文件\uuuuu来获取好的断言/异常消息时,这无疑是一种方法 Xpressive直接使用它的唯一地方是regex\u error.hpp: #defin

我注意到,当我在代码中使用xp::sregex::compile时,字符串…\3rdparty\boost-1\u 58\boost/xpressive/detail/core/matcher/regex\u byref\u matcher.hpp(带有我的本地路径)会出现在发布mods中编译的二进制代码中。
有办法删除它吗?

当代码使用
\uuuu文件\uuuuu
来获取好的断言/异常消息时,这无疑是一种方法

Xpressive直接使用它的唯一地方是
regex\u error.hpp

#define BOOST_XPR_ENSURE_(pred, code, msg)                                                          \
    boost::xpressive::detail::ensure_(!!(pred), code, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)  \
    /**/
你可以很容易地把它改成

#include <boost/xpressive/regex_error.hpp>

#undef BOOST_XPR_ENSURE_

#define BOOST_XPR_ENSURE_(pred, code, msg)                                                          \
    boost::xpressive::detail::ensure_(!!(pred), code, msg, BOOST_CURRENT_FUNCTION, "(source-hidden)", __LINE__)  \
    /**/
#包括
#未定义增强\u XPR\u确保_
#定义BOOST\u XPR\u sure\u(pred、code、msg)\
boost::xpressive::detail::确保(!!(pred),代码,消息,boost\u CURRENT\u函数,“(源代码隐藏)”,\u行\u)\
/**/
请记住:

  • 黑客需要在任何其他Xpression包含之前进行
  • 这将限制消息的有用性(如果发生)
  • Xpressive所依赖的库之一可能使用类似的构造

请发布a/谢谢,这很有意义,我尝试过,但仍然得到二进制文件中regex_byref_matcher.hpp的路径,我没有看到字符串“source hidden”。此外,它仅使用undef成功编译,因此它实际上不符合此宏。