mirror of
https://github.com/boostorg/logic.git
synced 2025-12-23 15:18:12 +01:00
Compare commits
10 Commits
svn-branch
...
svn-branch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d8b1c49d2 | ||
|
|
5cf0ef44a7 | ||
|
|
0a8936b80a | ||
|
|
ea15a9abf6 | ||
|
|
1982b3ee5a | ||
|
|
192433a5e1 | ||
|
|
796f4a5fa8 | ||
|
|
e5c2ea9a90 | ||
|
|
72bd21d653 | ||
|
|
bf76f4668b |
@@ -1,6 +1,6 @@
|
||||
// Three-state boolean logic library
|
||||
|
||||
// Copyright Doug Gregor 2002-2004. Use, modification and
|
||||
// Copyright Douglas Gregor 2002-2004. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
* The actual stored value in this 3-state boolean, which may be false, true,
|
||||
* or indeterminate.
|
||||
*/
|
||||
enum { false_value, true_value, indeterminate_value } value;
|
||||
enum value_t { false_value, true_value, indeterminate_value } value;
|
||||
};
|
||||
|
||||
// Check if the given tribool has an indeterminate value. Also doubles as a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Three-state boolean logic library
|
||||
|
||||
// Copyright Doug Gregor 2002-2004. Use, modification and
|
||||
// Copyright Douglas Gregor 2002-2004. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Three-state boolean logic library
|
||||
|
||||
// Copyright Doug Gregor 2002-2003. Use, modification and
|
||||
// Copyright Douglas Gregor 2002-2004. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -104,9 +104,10 @@ template<>
|
||||
inline std::basic_string<char> get_default_indeterminate_name<char>()
|
||||
{ return "indeterminate"; }
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// VC++ 6.0 chokes on the specialization below, so we're stuck without
|
||||
// wchar_t support. What a pain.
|
||||
// wchar_t support. What a pain. TODO: it might just need a the template
|
||||
// parameter as function parameter...
|
||||
#else
|
||||
# ifndef BOOST_NO_WCHAR_T
|
||||
/// Returns the wide character string L"indeterminate".
|
||||
@@ -201,6 +202,26 @@ operator<<(std::basic_ostream<CharT, Traits>& out, tribool x)
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Writes the indeterminate tribool value to a stream.
|
||||
*
|
||||
* This routine outputs either the integer
|
||||
* value 2 (if <tt>(out.flags() & std::ios_base::boolalpha) == 0</tt>)
|
||||
* or the name of the indeterminate value. The name of the
|
||||
* indeterminate value comes from the indeterminate_name facet (if it
|
||||
* is defined in the output stream's locale), or from the
|
||||
* get_default_indeterminate_name function (if it is not defined in the
|
||||
* locale or if the C++ standard library implementation does not
|
||||
* support locales).
|
||||
*
|
||||
* \returns @p out
|
||||
*/
|
||||
template<typename CharT, typename Traits>
|
||||
inline std::basic_ostream<CharT, Traits>&
|
||||
operator<<(std::basic_ostream<CharT, Traits>& out,
|
||||
bool (*)(tribool, detail::indeterminate_t))
|
||||
{ return out << tribool(indeterminate); }
|
||||
|
||||
/**
|
||||
* \brief Reads a tribool value from a stream.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user