Update of /cvsroot/boost/boost/boost/fusion/sequence/container/deque/detail
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1654/sequence/container/deque/detail
Modified Files:
keyed_element.hpp
Log Message:
adding working converting ctors for zero length sequences
Index: keyed_element.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/fusion/sequence/container/deque/detail/keyed_element.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- keyed_element.hpp 2 Mar 2007 10:44:09 -0000 1.3
+++ keyed_element.hpp 6 Jul 2007 20:47:11 -0000 1.4
@@ -11,6 +11,9 @@
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/add_const.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
namespace boost { namespace fusion {
struct fusion_sequence_tag;
@@ -21,6 +24,13 @@
{
typedef fusion_sequence_tag tag;
void get();
+
+ template<typename It>
+ static nil_keyed_element
+ from_iterator(It const&)
+ {
+ return nil_keyed_element();
+ }
};
template<typename Key, typename Value, typename Rest>
@@ -31,6 +41,14 @@
typedef fusion_sequence_tag tag;
using Rest::get;
+ template<typename It>
+ static keyed_element
+ from_iterator(It const& it)
+ {
+ return keyed_element(
+ *it, base::from_iterator(fusion::next(it)));
+ }
+
template<typename U, typename Rst>
keyed_element(keyed_element<Key, U, Rst> const& rhs)
: Rest(rhs.get_base()), value_(rhs.value_)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs