|
Boost : |
From: Steven Watanabe (steven_at_[hidden])
Date: 2006-12-20 18:22:52
AMDG
Steven Watanabe wrote:
> AMDG
> Actually I got the patch for operator_return_type_traits.hpp wrong.
> I'll post a corrected version later today.
>
> In Christ,
> Steven Watanabe
>
>
Ok. Here it is.
In Christ,
Steven Watanabe
*** operator_return_type_traits.hpp.orig Mon Dec 18 10:42:30 2006
--- operator_return_type_traits.hpp Wed Dec 20 11:57:02 2006
***************
*** 886,891 ****
--- 886,896 ----
#endif
+ namespace boost {
+ template<class T, std::size_t N>
+ class array;
+ }
+
namespace boost {
***************
*** 905,936 ****
// deque
template<class T, class Allocator, class B>
! struct plain_return_type_2<other_action<subscript_action>, std::deque<T, Allocator>, B> {
typedef typename std::deque<T, Allocator>::reference type;
};
template<class T, class Allocator, class B>
! struct plain_return_type_2<other_action<subscript_action>, const std::deque<T, Allocator>, B> {
typedef typename std::deque<T, Allocator>::const_reference type;
};
// vector
template<class T, class Allocator, class B>
! struct plain_return_type_2<other_action<subscript_action>, std::vector<T, Allocator>, B> {
typedef typename std::vector<T, Allocator>::reference type;
};
template<class T, class Allocator, class B>
! struct plain_return_type_2<other_action<subscript_action>, const std::vector<T, Allocator>, B> {
typedef typename std::vector<T, Allocator>::const_reference type;
};
// basic_string
template<class Char, class Traits, class Allocator, class B>
! struct plain_return_type_2<other_action<subscript_action>, std::basic_string<Char, Traits, Allocator>, B> {
typedef typename std::basic_string<Char, Traits, Allocator>::reference type;
};
template<class Char, class Traits, class Allocator, class B>
! struct plain_return_type_2<other_action<subscript_action>, const std::basic_string<Char, Traits, Allocator>, B> {
typedef typename std::basic_string<Char, Traits, Allocator>::const_reference type;
};
--- 910,991 ----
// deque
template<class T, class Allocator, class B>
! struct return_type_2<other_action<subscript_action>, std::deque<T, Allocator>, B> {
typedef typename std::deque<T, Allocator>::reference type;
};
template<class T, class Allocator, class B>
! struct return_type_2<other_action<subscript_action>, const std::deque<T, Allocator>, B> {
typedef typename std::deque<T, Allocator>::const_reference type;
};
// vector
template<class T, class Allocator, class B>
! struct return_type_2<other_action<subscript_action>, std::vector<T, Allocator>, B> {
typedef typename std::vector<T, Allocator>::reference type;
};
template<class T, class Allocator, class B>
! struct return_type_2<other_action<subscript_action>, const std::vector<T, Allocator>, B> {
typedef typename std::vector<T, Allocator>::const_reference type;
};
// basic_string
template<class Char, class Traits, class Allocator, class B>
! struct return_type_2<other_action<subscript_action>, std::basic_string<Char, Traits, Allocator>, B> {
typedef typename std::basic_string<Char, Traits, Allocator>::reference type;
};
template<class Char, class Traits, class Allocator, class B>
! struct return_type_2<other_action<subscript_action>, const std::basic_string<Char, Traits, Allocator>, B> {
typedef typename std::basic_string<Char, Traits, Allocator>::const_reference type;
+ };
+
+ template<class T, int N, class B>
+ struct return_type_2<other_action<subscript_action>, boost::array<T, N>, B> {
+ typedef typename boost::array<T, N>::reference type;
+ };
+ template<class T, int N, class B>
+ struct return_type_2<other_action<subscript_action>, const boost::array<T, N>, B> {
+ typedef typename boost::array<T, N>::const_reference type;
+ };
+
+
+ // -- plus_action for basic_string -----------------------------------------------------------------
+ template<class Char, class Traits, class Allocator>
+ struct plain_return_type_2<arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator>, std::basic_string<Char, Traits, Allocator> > {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ // -- pointer versions -----------------------------------------------------------------------------
+ template<class Char, class Traits, class Allocator>
+ struct plain_return_type_2<arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator>, Char*> {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ template<class Char, class Traits, class Allocator>
+ struct plain_return_type_2<arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator>, const Char*> {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ template<class Char, class Traits, class Allocator>
+ struct plain_return_type_2<Char*, arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator> > {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ template<class Char, class Traits, class Allocator>
+ struct plain_return_type_2<const Char*, arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator> > {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ // -- array versions ---------------------------------------------------------------------------------
+ template<class Char, class Traits, class Allocator, int N>
+ struct plain_return_type_2<arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator>, Char[N]> {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ template<class Char, class Traits, class Allocator, int N>
+ struct plain_return_type_2<arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator>, const Char[N]> {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ template<class Char, class Traits, class Allocator, int N>
+ struct plain_return_type_2<Char[N], arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator> > {
+ typedef std::basic_string<Char, Traits, Allocator> type;
+ };
+ template<class Char, class Traits, class Allocator, int N>
+ struct plain_return_type_2<const Char[N], arithmetic_action<plus_action>, std::basic_string<Char, Traits, Allocator> > {
+ typedef std::basic_string<Char, Traits, Allocator> type;
};
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk