mirror of
https://github.com/boostorg/logic.git
synced 2025-07-29 19:57:17 +02:00
trac-12244: fix detection of wchar_t availability
This commit is contained in:
@ -45,7 +45,7 @@ template<>
|
||||
inline std::basic_string<char> default_false_name<char>()
|
||||
{ return "false"; }
|
||||
|
||||
# ifndef BOOST_NO_WCHAR_T
|
||||
# if !defined(BOOST_NO_CWCHAR)
|
||||
/**
|
||||
* \brief Returns the wide character string L"false".
|
||||
*
|
||||
@ -76,7 +76,7 @@ template<>
|
||||
inline std::basic_string<char> default_true_name<char>()
|
||||
{ return "true"; }
|
||||
|
||||
# ifndef BOOST_NO_WCHAR_T
|
||||
# if !defined(BOOST_NO_CWCHAR)
|
||||
/**
|
||||
* \brief Returns the wide character string L"true".
|
||||
*
|
||||
@ -104,7 +104,7 @@ template<>
|
||||
inline std::basic_string<char> get_default_indeterminate_name<char>()
|
||||
{ return "indeterminate"; }
|
||||
|
||||
#ifndef BOOST_NO_WCHAR_T
|
||||
#if !defined(BOOST_NO_CWCHAR)
|
||||
/// Returns the wide character string L"indeterminate".
|
||||
template<>
|
||||
inline std::basic_string<wchar_t> get_default_indeterminate_name<wchar_t>()
|
||||
|
@ -20,6 +20,18 @@ int test_main(int, char*[])
|
||||
|
||||
tribool x;
|
||||
|
||||
#if !defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_STD_WSTRING)
|
||||
std::wostringstream wout;
|
||||
wout << std::boolalpha << tribool(false);
|
||||
BOOST_CHECK(wout.str() == L"false");
|
||||
wout.str(std::wstring());
|
||||
wout << std::boolalpha << tribool(true);
|
||||
BOOST_CHECK(wout.str() == L"true");
|
||||
wout.str(std::wstring());
|
||||
wout << std::boolalpha << tribool(indeterminate);
|
||||
BOOST_CHECK(wout.str() == L"indeterminate");
|
||||
#endif
|
||||
|
||||
// Check tribool output
|
||||
std::ostringstream out;
|
||||
|
||||
|
Reference in New Issue
Block a user