FEATURE: BOOST_FUSION_AUTO_ADAPT_STRUCT_NAMED that does not require specifying the types of the fields.

This commit is contained in:
Damien Buhl (alias daminetreg)
2014-01-26 17:31:01 +01:00
parent 946957d3dc
commit 0d7ad9f6e2
4 changed files with 165 additions and 0 deletions

View File

@ -14,7 +14,9 @@
#include <boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp>
#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
#include <boost/fusion/adapted/struct/adapt_struct_named.hpp>
#include <boost/fusion/adapted/struct/auto_adapt_struct_named.hpp>
#include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include <boost/fusion/adapted/struct/auto_adapt_struct.hpp>
#include <boost/fusion/adapted/struct/define_assoc_struct.hpp>
#include <boost/fusion/adapted/struct/define_struct.hpp>
#include <boost/fusion/adapted/struct/define_struct_inline.hpp>

View File

@ -0,0 +1,25 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2009-2010 Hartmut Kaiser
Copyright (c) 2010-2011 Christopher Schmidt
Copyright (c) 2013-2014 Damien Buhl
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)
==============================================================================*/
#ifndef BOOST_FUSION_ADAPTED_STRUCT_AUTO_ADAPT_STRUCT_NAMED_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_AUTO_ADAPT_STRUCT_NAMED_HPP
#include <boost/fusion/adapted/struct/adapt_struct_named.hpp>
#include <boost/fusion/adapted/struct/auto_adapt_struct.hpp>
#define BOOST_FUSION_AUTO_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_NAMED( \
WRAPPED_TYPE,NAME, \
BOOST_PP_SEQ_FOR_EACH( \
BOOST_FUSION_AUTO_ADAPT_STRUCT_FILLER, WRAPPED_TYPE, ATTRIBUTES) \
)
#endif