Compare commits

..

8 Commits

Author SHA1 Message Date
Eric Friedman f6e8ce85e3 Updated to match 1.30.0 release.
[SVN r1108]
2003-03-26 00:25:46 +00:00
Eric Friedman a5ba3b0132 Added missing detail/workaround.hpp #include.
[SVN r951]
2003-02-11 09:16:15 +00:00
Eric Friedman ff8afc877c Added version by Fernando Cacciola (to be removed on release of next version of Boost).
[SVN r944]
2003-02-11 05:00:19 +00:00
Eric Friedman 2ded07a196 Boost.Move ver. 2, initial release.
[SVN r797]
2002-12-28 10:36:47 +00:00
Eric Friedman 5c78cdb9c5 Boost.Visitor initial release.
[SVN r792]
2002-12-25 00:00:48 +00:00
Eric Friedman 72667a6658 Updated to use Boost.Test from 1.29.0
[SVN r715]
2002-11-27 00:22:57 +00:00
Eric Friedman 94ee9ddc97 Initial release.
[SVN r446]
2002-08-25 09:12:21 +00:00
nobody b683dba9be New repository initialized by cvs2svn.
[SVN r146]
2002-05-15 19:48:00 +00:00
2 changed files with 58 additions and 28 deletions
-28
View File
@@ -1,28 +0,0 @@
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
//
// 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)
//
// See http://www.boost.org/lib/optional for documentation.
//
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
//
#ifndef BOOST_DETAIL_NONE_T_17SEP2003_HPP
#define BOOST_DETAIL_NONE_T_17SEP2003_HPP
namespace boost {
namespace detail {
struct none_helper{};
typedef int none_helper::*none_t ;
} // namespace detail
} // namespace boost
#endif
+58
View File
@@ -0,0 +1,58 @@
//-----------------------------------------------------------------------------
// boost libs/optional/optional_test.cpp source file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Eric Friedman
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#include "boost/optional.hpp"
#include "boost/test/minimal.hpp"
#include "boost/cstdlib.hpp"
boost::optional<double> f(const boost::optional<bool>& return_flag, int arg)
{
if (!return_flag.empty() && return_flag.get() == true)
return double(arg);
return boost::optional<double>();
}
//////////////////////////////////////////////////////////////////////////
// function test_main
//
int test_main( int, char *[] )
{
boost::optional<double> result;
/* BOOST_TEST((
result.empty()
));
result = f(true, 3);
BOOST_TEST((
!result.empty() && result.get() == 3
));
result = f(false, 3);
BOOST_TEST((
result.empty()
));
boost::optional<bool> empty_flag;
result = f(empty_flag, 3);
BOOST_TEST((
result.empty()
));
*/
return boost::exit_success;
}