mirror of
https://github.com/boostorg/optional.git
synced 2025-07-23 17:17:17 +02:00
added optional ref swap
and also chaned the copyright year in docs
This commit is contained in:
@ -37,4 +37,3 @@ struct none_t
|
||||
} // namespace boost
|
||||
|
||||
#endif // header guard
|
||||
|
||||
|
@ -167,6 +167,12 @@ public:
|
||||
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
};
|
||||
|
||||
template <class T>
|
||||
void swap ( optional<T&>& x, optional<T&>& y) BOOST_NOEXCEPT
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // 1/0
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
|
||||
// Copyright (C) 2016 Andrzej Krzemienski
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -15,16 +16,25 @@
|
||||
#ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
|
||||
#define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
|
||||
|
||||
#include <boost/config/suffix.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
template<class T> class optional ;
|
||||
|
||||
// This forward is needed to refer to namespace scope swap from the member swap
|
||||
template<class T> void swap ( optional<T>& , optional<T>& );
|
||||
template<class T> void swap ( optional<T>& , optional<T>& ) ;
|
||||
|
||||
template<class T> struct optional_swap_should_use_default_constructor ;
|
||||
|
||||
#ifndef BOOST_OPTIONAL_CONFIG_DONT_SPECIALIZE_OPTIONAL_REFS
|
||||
|
||||
template<class T> class optional<T&> ;
|
||||
|
||||
template<class T> void swap ( optional<T&>& , optional<T&>& ) BOOST_NOEXCEPT;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user