Compare commits

..

1 Commits

Author SHA1 Message Date
dd40add326 Created a branch from trunk
[SVN r38959]
2007-08-26 05:34:35 +00:00
5 changed files with 15 additions and 34 deletions

View File

@ -6,11 +6,4 @@ doxygen reference : [ glob ../../../boost/logic/tribool.hpp ]
[ glob ../../../boost/logic/tribool_fwd.hpp ] [ glob ../../../boost/logic/tribool_fwd.hpp ]
[ glob ../../../boost/logic/tribool_io.hpp ] [ glob ../../../boost/logic/tribool_io.hpp ]
; ;
boostbook tribool boostbook tribool : tribool.boostbook ;
:
tribool.boostbook
:
<xsl:param>boost.root=../../../..
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
<dependency>reference
;

View File

@ -14,7 +14,7 @@
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/detail/workaround.hpp> #include <boost/detail/workaround.hpp>
#if defined(_MSC_VER) #if BOOST_WORKAROUND(_MSC_VER, >= 1200)
# pragma once # pragma once
#endif #endif
@ -93,7 +93,7 @@ public:
* *
* \throws nothrow * \throws nothrow
*/ */
tribool(bool initial_value) : value(initial_value? true_value : false_value) {} tribool(bool value) : value(value? true_value : false_value) {}
/** /**
* Construct a new 3-state boolean value with an indeterminate value. * Construct a new 3-state boolean value with an indeterminate value.
@ -336,7 +336,7 @@ inline tribool operator==(tribool x, tribool y)
if (indeterminate(x) || indeterminate(y)) if (indeterminate(x) || indeterminate(y))
return indeterminate; return indeterminate;
else else
return (x && y) || (!x && !y); return x && y || !x && !y;
} }
/** /**
@ -399,7 +399,7 @@ inline tribool operator!=(tribool x, tribool y)
if (indeterminate(x) || indeterminate(y)) if (indeterminate(x) || indeterminate(y))
return indeterminate; return indeterminate;
else else
return !((x && y) || (!x && !y)); return !(x && y || !x && !y);
} }
/** /**
@ -452,7 +452,7 @@ namespace boost {
#define BOOST_TRIBOOL_THIRD_STATE(Name) \ #define BOOST_TRIBOOL_THIRD_STATE(Name) \
inline bool \ inline bool \
Name(boost::logic::tribool x, \ Name(boost::logic::tribool x, \
boost::logic::detail::indeterminate_t = \ boost::logic::detail::indeterminate_t dummy = \
boost::logic::detail::indeterminate_t()) \ boost::logic::detail::indeterminate_t()) \
{ return x.value == boost::logic::tribool::indeterminate_value; } { return x.value == boost::logic::tribool::indeterminate_value; }

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp> #include <boost/detail/workaround.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#if defined(_MSC_VER) #if BOOST_WORKAROUND(_MSC_VER, >= 1200)
# pragma once # pragma once
#endif #endif
@ -104,11 +104,17 @@ template<>
inline std::basic_string<char> get_default_indeterminate_name<char>() inline std::basic_string<char> get_default_indeterminate_name<char>()
{ return "indeterminate"; } { return "indeterminate"; }
#ifndef BOOST_NO_WCHAR_T #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. 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". /// Returns the wide character string L"indeterminate".
template<> template<>
inline std::basic_string<wchar_t> get_default_indeterminate_name<wchar_t>() inline std::basic_string<wchar_t> get_default_indeterminate_name<wchar_t>()
{ return L"indeterminate"; } { return L"indeterminate"; }
# endif
#endif #endif
// http://www.cantrip.org/locale.html // http://www.cantrip.org/locale.html
@ -134,8 +140,7 @@ public:
indeterminate_name() : name_(get_default_indeterminate_name<CharT>()) {} indeterminate_name() : name_(get_default_indeterminate_name<CharT>()) {}
/// Construct the facet with the given name for the indeterminate value /// Construct the facet with the given name for the indeterminate value
explicit indeterminate_name(const string_type& initial_name) explicit indeterminate_name(const string_type& name) : name_(name) {}
: name_(initial_name) {}
/// Returns the name for the indeterminate value /// Returns the name for the indeterminate value
string_type name() const { return name_; } string_type name() const { return name_; }

View File

@ -1,16 +0,0 @@
<!--
Copyright 2011 Daniel James.
Distributed under 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)
-->
<html>
<head>
<meta http-equiv="refresh" content="0; URL=../../doc/html/tribool.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="../../doc/html/tribool.html">../../doc/html/tribool.html</a>
</body>
</html>

View File

@ -8,7 +8,6 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <ios> // for std::boolalpha
#ifndef BOOST_NO_STD_LOCALE #ifndef BOOST_NO_STD_LOCALE
# include <locale> # include <locale>