تعزيز :: Xpressive تجميع لغز تحت مينغو
-
06-07-2019 - |
سؤال
والتحول إلى دول مجلس التعاون الخليجي لأول مرة، وأنا اتلقى قليلا الخلط من جانب ما المترجم تقول لي هنا. أساسا، فإنه يتصرف مثل دفعة :: :: xpressive لم يتم تعريف wsregex (أعتقد).
وهنا هو رمز ذات الصلة:
#include "criterion.h"
#include <string>
#include <boost/xpressive/xpressive.hpp>
//More lines of code omitted here
class perlRegex : public regexClass
{
private:
std::wstring regexString;
boost::xpressive::wsregex regex; // This is the line complained about
public:
unsigned __int32 getPriorityClass() const;
BOOL include(fileData &file) const;
unsigned int directoryCheck(const std::wstring& /*directory*/) const;
std::wstring debugTree() const;
perlRegex(const std::wstring& inRegex);
};
وهنا الخطأ:
regex.h:46: error: using-declaration for non-member at class scope
regex.h:46: error: expected `;' before "regex"
وماذا أنا في حيرة من أمري هنا هو أنني معلنا عضوا، إلا أنه يشكو من أن أنا باستخدام عضوا في مكان آخر.
هل أنا نسيت أن #include
شيء؟
وشكرا مقدما، Billy3
المحلول
وسيغوين ومينغو لا يعتمد أحرف واسعة، لذلك لا يمكن xpressive سواء. انظر ما يلي من xpressive_fwd.hpp:
#if defined(BOOST_NO_CWCHAR) | \
defined(BOOST_NO_CWCTYPE) | \
defined(BOOST_NO_STD_WSTRING)
# ifndef BOOST_XPRESSIVE_NO_WREGEX
# define BOOST_XPRESSIVE_NO_WREGEX
# endif
#endif
ويتم تعريف وحدات الماكرو BOOST_NO_CWCHAR، BOOST_NO_CWCTYPE وBOOST_NO_STD_WSTRING تلقائيا من قبل رأس config.hpp دفعة لبك platcorm / مترجم / الأمراض المنقولة جنسيا المكتبة. عذرا.
في المستقبل، ستحصل على نتائج أفضل نشر الأسئلة دفعة لائحة المستخدمين دفعة ".
و- اريك Niebler BoostPro الحاسبات www.boostpro.com