Preprocessor library is now C friendly.

[SVN r12552]
This commit is contained in:
Vesa Karvonen
2002-01-29 14:13:10 +00:00
parent 972f6222d1
commit df1244ba20
137 changed files with 1671 additions and 1272 deletions

View File

@ -1,24 +1,25 @@
#ifndef BOOST_PREPROCESSOR_TUPLE_EAT_HPP
#define BOOST_PREPROCESSOR_TUPLE_EAT_HPP
// Copyright (C) 2001
// Housemarque Oy
// http://www.housemarque.com
//
// Permission to copy, use, modify, sell and distribute this software is
// granted provided this copyright notice appears in all copies. This
// software is provided "as is" without express or implied warranty, and
// with no claim as to its suitability for any purpose.
/* Copyright (C) 2001
* Housemarque Oy
* http://www.housemarque.com
*
* Permission to copy, use, modify, sell and distribute this software is
* granted provided this copyright notice appears in all copies. This
* software is provided "as is" without express or implied warranty, and
* with no claim as to its suitability for any purpose.
*
* See http://www.boost.org for most recent version.
*/
// See http://www.boost.org for most recent version.
/*! \file
/** \file
<a href="../../../../boost/preprocessor/tuple/eat.hpp">Click here to see the header.</a>
*/
//! Expands to a macro that eats a tuple of the specified length.
/*!
/** Expands to a macro that eats a tuple of the specified length.
BOOST_PP_TUPLE_EAT() is designed to be used with BOOST_PP_IF() like
BOOST_PP_EMPTY().

View File

@ -1,24 +1,25 @@
#ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP
#define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP
// Copyright (C) 2001
// Housemarque Oy
// http://www.housemarque.com
//
// Permission to copy, use, modify, sell and distribute this software is
// granted provided this copyright notice appears in all copies. This
// software is provided "as is" without express or implied warranty, and
// with no claim as to its suitability for any purpose.
/* Copyright (C) 2001
* Housemarque Oy
* http://www.housemarque.com
*
* Permission to copy, use, modify, sell and distribute this software is
* granted provided this copyright notice appears in all copies. This
* software is provided "as is" without express or implied warranty, and
* with no claim as to its suitability for any purpose.
*
* See http://www.boost.org for most recent version.
*/
// See http://www.boost.org for most recent version.
/*! \file
/** \file
<a href="../../../../boost/preprocessor/tuple/elem.hpp">Click here to see the header.</a>
*/
//! Expands to the I:th element of an N-tuple.
/*!
/** Expands to the I:th element of an N-tuple.
For example,
<PRE>\verbatim
@ -43,21 +44,23 @@ See BOOST_PP_LIMIT_TUPLE.
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406
// This is a workaround for a CodeWarrior PP bug. Strictly speaking
// this workaround invokes undefined behavior, but it works as desired.
/* This is a workaround for a CodeWarrior PP bug. Strictly speaking
* this workaround invokes undefined behavior, but it works as desired.
*/
# define BOOST_PP_TUPLE_ELEM_DELAY(N,I,T) BOOST_PP_TUPLE##N##_ELEM##I##T
#elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER)
# include <boost/preprocessor/expand.hpp>
// This is a workaround for a MSVC++ PP bug. It should not be necessary
// to use BOOST_PP_EXPAND(). Works on standard conforming compilers, too.
/* This is a workaround for a MSVC++ PP bug. It should not be necessary
* to use BOOST_PP_EXPAND(). Works on standard conforming compilers, too.
*/
# define BOOST_PP_TUPLE_ELEM_DELAY(N,I,T) BOOST_PP_EXPAND(BOOST_PP_TUPLE##N##_ELEM##I T)
#else
# define BOOST_PP_TUPLE_ELEM_DELAY(N,I,T) BOOST_PP_TUPLE##N##_ELEM##I T
#endif
// NOTE: TUPLE_ELEM can be implemented in O(N*N) space and O(N) time instead
// of O(N*N*N) space and O(1) time. The current trade-off seems better.
/* NOTE: TUPLE_ELEM can be implemented in O(N*N) space and O(N) time instead
* of O(N*N*N) space and O(1) time. The current trade-off seems better.
*/
#define BOOST_PP_TUPLE1_ELEM0(A) A
#define BOOST_PP_TUPLE2_ELEM0(A,B) A
@ -211,6 +214,6 @@ See BOOST_PP_LIMIT_TUPLE.
#define BOOST_PP_TUPLE16_ELEM15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) P
#endif
//! Obsolete. Use BOOST_PP_TUPLE_ELEM().
/** Obsolete. Use BOOST_PP_TUPLE_ELEM(). */
#define BOOST_PREPROCESSOR_TUPLE_ELEM(N,I,T) BOOST_PP_TUPLE_ELEM(N,I,T)
#endif

View File

@ -1,26 +1,27 @@
#ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP
#define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP
// Copyright (C) 2001
// Housemarque Oy
// http://www.housemarque.com
//
// Permission to copy, use, modify, sell and distribute this software is
// granted provided this copyright notice appears in all copies. This
// software is provided "as is" without express or implied warranty, and
// with no claim as to its suitability for any purpose.
/* Copyright (C) 2001
* Housemarque Oy
* http://www.housemarque.com
*
* Permission to copy, use, modify, sell and distribute this software is
* granted provided this copyright notice appears in all copies. This
* software is provided "as is" without express or implied warranty, and
* with no claim as to its suitability for any purpose.
*
* See http://www.boost.org for most recent version.
*/
// See http://www.boost.org for most recent version.
/*! \file
/** \file
<a href="../../../../boost/preprocessor/tuple/to_list.hpp">Click here to see the header.</a>
*/
#include <boost/preprocessor/list/adt.hpp>
//! Converts a tuple to a list.
/*!
/** Converts a tuple to a list.
See BOOST_PP_LIST_CONS() for an example.
See BOOST_PP_LIMIT_TUPLE.