forked from boostorg/regex
@ -115,11 +115,6 @@ if ! $(disable-icu)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
actions regex_simple_run_action
|
|
||||||
{
|
|
||||||
$(>) > $(<)
|
|
||||||
}
|
|
||||||
|
|
||||||
rule regex-run-simple ( sources + : args * : input-files * : requirements * : target-name )
|
rule regex-run-simple ( sources + : args * : input-files * : requirements * : target-name )
|
||||||
{
|
{
|
||||||
exe $(target-name)_exe : $(sources) : $(requirements) ;
|
exe $(target-name)_exe : $(sources) : $(requirements) ;
|
||||||
@ -129,7 +124,7 @@ rule regex-run-simple ( sources + : args * : input-files * : requirements * : ta
|
|||||||
alias $(target-name) : $(target-name).output ;
|
alias $(target-name) : $(target-name).output ;
|
||||||
}
|
}
|
||||||
|
|
||||||
regex-run-simple has_icu_test.cpp : : : $(ICU_OPTS) : has_icu ;
|
unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ;
|
||||||
explicit has_icu ;
|
explicit has_icu ;
|
||||||
|
|
||||||
alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ;
|
alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ;
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
#error "Mixing ICU with a static runtime doesn't work"
|
#error "Mixing ICU with a static runtime doesn't work"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void print_error(UErrorCode err, const char* func)
|
||||||
|
{
|
||||||
|
std::cerr << "Error from function " << func << " with error: " << ::u_errorName(err) << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// To detect possible binary mismatches between the installed ICU build, and whatever
|
// To detect possible binary mismatches between the installed ICU build, and whatever
|
||||||
@ -31,8 +36,17 @@ int main()
|
|||||||
UErrorCode err = U_ZERO_ERROR;
|
UErrorCode err = U_ZERO_ERROR;
|
||||||
UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, "GREEK SMALL LETTER ALPHA", &err);
|
UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, "GREEK SMALL LETTER ALPHA", &err);
|
||||||
std::cout << (int)c << std::endl;
|
std::cout << (int)c << std::endl;
|
||||||
if(err > 0) return err;
|
if(err > 0)
|
||||||
|
{
|
||||||
|
print_error(err, "u_charFromName");
|
||||||
|
return err;
|
||||||
|
}
|
||||||
U_NAMESPACE_QUALIFIER Locale l;
|
U_NAMESPACE_QUALIFIER Locale l;
|
||||||
boost::scoped_ptr<U_NAMESPACE_QUALIFIER Collator> p_col(U_NAMESPACE_QUALIFIER Collator::createInstance(l, err));
|
boost::scoped_ptr<U_NAMESPACE_QUALIFIER Collator> p_col(U_NAMESPACE_QUALIFIER Collator::createInstance(l, err));
|
||||||
|
if(err > 0)
|
||||||
|
{
|
||||||
|
print_error(err, "Collator::createInstance");
|
||||||
|
return err;
|
||||||
|
}
|
||||||
return err > 0 ? err : 0;
|
return err > 0 ? err : 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user