boost guidelines (mainly from inspect tool: tabs, license reference text, etc.); more to do...

[SVN r34753]
This commit is contained in:
Gennaro Prota
2006-07-27 11:48:49 +00:00
parent a460694e5d
commit dff8a5c505
11 changed files with 96 additions and 96 deletions

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
#define BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
@ -10,18 +10,18 @@
#ifndef BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof {
# define BOOST_TYPEOF_END_ENCODE_NS }}
# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof {
# define BOOST_TYPEOF_END_ENCODE_NS }}
# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
#else
# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of {
# define BOOST_TYPEOF_END_ENCODE_NS }}
# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of {
# define BOOST_TYPEOF_END_ENCODE_NS }}
# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
# define BOOST_TYPEOF_TEXT "unnamed namespace is off"
# include <boost/typeof/message.hpp>
# include <boost/typeof/message.hpp>
#endif
@ -40,8 +40,8 @@ BOOST_TYPEOF_END_ENCODE_NS
namespace boost { namespace type_of {
template<class V, class T>
struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
template<class V, class T>
struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
{};
template<class Iter>

View File

@ -1,6 +1,6 @@
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
#define BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
@ -11,7 +11,7 @@
// Assumes iter0 contains initial iterator
#define BOOST_TYPEOF_DECODE_PARAM(z, n, text) \
typedef boost::type_of::decode_type<iter##n> decode##n; \
typedef boost::type_of::decode_type<iter##n> decode##n; \
typedef typename decode##n::type p##n; \
typedef typename decode##n::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
@ -21,14 +21,14 @@
// The P0, P1, ... PN are encoded and added to V
#define BOOST_TYPEOF_ENCODE_PARAMS_BEGIN(z, n, text)\
typename boost::type_of::encode_type<
typename boost::type_of::encode_type<
#define BOOST_TYPEOF_ENCODE_PARAMS_END(z, n, text)\
, BOOST_PP_CAT(P, n)>::type
#define BOOST_TYPEOF_ENCODE_PARAMS(n, ID) \
BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_BEGIN, ~) \
typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type \
typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type \
BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~)
#endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED

View File

@ -1,6 +1,6 @@
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_INTEGRAL_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_INTEGRAL_TEMPLATE_PARAM_HPP_INCLUDED
@ -55,14 +55,14 @@
// INTEGRAL_PARAM "virtual functions" implementation
#define BOOST_TYPEOF_INTEGRAL_PARAM_ENCODE(This, n)\
typedef typename boost::type_of::encode_integral<\
typedef typename boost::type_of::encode_integral<\
BOOST_PP_CAT(V, n),\
BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This),\
BOOST_PP_CAT(P, n)\
>::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
#define BOOST_TYPEOF_INTEGRAL_PARAM_DECODE(This, n)\
typedef boost::type_of::decode_integral<BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This), BOOST_PP_CAT(iter, n)> BOOST_PP_CAT(d, n);\
typedef boost::type_of::decode_integral<BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This), BOOST_PP_CAT(iter, n)> BOOST_PP_CAT(d, n);\
static const BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This) BOOST_PP_CAT(P, n) = BOOST_PP_CAT(d, n)::value;\
typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_MODIFIERS_HPP_INCLUDED
#define BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
@ -16,14 +16,14 @@
template<class V, class T> struct encode_type_impl<V, Fun(T)>\
{\
typedef\
typename boost::type_of::encode_type<\
typename boost::type_of::encode_type<\
typename boost::type_of::push_back<\
V\
, boost::mpl::size_t<ID> >::type\
, boost::mpl::size_t<ID> >::type\
, T>::type\
type;\
};\
template<class Iter> struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
template<class Iter> struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
{\
typedef boost::type_of::decode_type<Iter> d1;\
typedef Fun(typename d1::type) type;\
@ -64,13 +64,13 @@ BOOST_TYPEOF_END_ENCODE_NS
typename boost::type_of::push_back<\
typename boost::type_of::push_back<\
V\
, boost::mpl::size_t<ID> >::type\
, boost::mpl::size_t<N> >::type\
, boost::mpl::size_t<ID> >::type\
, boost::mpl::size_t<N> >::type\
, T>::type\
type;\
};\
template<class Iter>\
struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
{\
enum{n = Iter::type::value};\
typedef boost::type_of::decode_type<typename Iter::next> d;\

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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)
#include <boost/typeof/encode_decode_params.hpp>
@ -26,41 +26,41 @@ struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
#ifndef BOOST_TYPEOF_NO_FUNCTION_TYPES
// function references
// function references
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
struct encode_type_impl<V, R(&)(BOOST_PP_ENUM_PARAMS(n, P))>
{
typedef R BOOST_PP_CAT(P, n);
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_ID + n) type;
};
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
struct encode_type_impl<V, R(&)(BOOST_PP_ENUM_PARAMS(n, P))>
{
typedef R BOOST_PP_CAT(P, n);
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_ID + n) type;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_REF_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
typedef BOOST_PP_CAT(p, n)(&type)(BOOST_PP_ENUM_PARAMS(n, p));
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_REF_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
typedef BOOST_PP_CAT(p, n)(&type)(BOOST_PP_ENUM_PARAMS(n, p));
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
// functions
// functions
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
struct encode_type_impl<V, R(BOOST_PP_ENUM_PARAMS(n, P))>
{
typedef R BOOST_PP_CAT(P, n);
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_ID + n) type;
};
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
struct encode_type_impl<V, R(BOOST_PP_ENUM_PARAMS(n, P))>
{
typedef R BOOST_PP_CAT(P, n);
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_ID + n) type;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
typedef BOOST_PP_CAT(p, n)(type)(BOOST_PP_ENUM_PARAMS(n, p));
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
typedef BOOST_PP_CAT(p, n)(type)(BOOST_PP_ENUM_PARAMS(n, p));
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
#endif//BOOST_TYPEOF_NO_FUNCTION_TYPES

View File

@ -1,7 +1,7 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Copyright (C) 2005 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
#define BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
@ -128,14 +128,14 @@
BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TYPE)(Name,Params)
#define BOOST_TYPEOF_REGISTER_TEMPLATE_IMPL(Name, Params, Size, ID)\
BOOST_TYPEOF_BEGIN_ENCODE_NS\
BOOST_TYPEOF_BEGIN_ENCODE_NS\
BOOST_TYPEOF_REGISTER_TEMPLATE_TEMPLATE_IMPL(Name, Params, ID)\
template<class V\
BOOST_TYPEOF_SEQ_ENUM_TRAILING(Params, BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR)\
>\
struct encode_type_impl<V, Name<BOOST_PP_ENUM_PARAMS(Size, P)> >\
{\
typedef typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type V0;\
typedef typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type V0;\
BOOST_PP_SEQ_FOR_EACH_I(BOOST_TYPEOF_REGISTER_TEMPLATE_ENCODE_PARAM, ~, Params)\
typedef BOOST_PP_CAT(V, Size) type;\
};\
@ -147,6 +147,6 @@
BOOST_TYPEOF_TYPEDEF_DECODED_TYPE(Name, Params)\
typedef BOOST_PP_CAT(iter, Size) iter;\
};\
BOOST_TYPEOF_END_ENCODE_NS
BOOST_TYPEOF_END_ENCODE_NS
#endif//BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED

View File

@ -1,7 +1,7 @@
// Copyright (C) 2005 Peder Holt
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
@ -60,8 +60,8 @@ BOOST_TYPEOF_END_ENCODE_NS
namespace boost { namespace type_of {
template<class V, class T> struct encode_template
: BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl<V, T>
template<class V, class T> struct encode_template
: BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl<V, T>
{};
template<class Iter> struct decode_template
@ -81,10 +81,10 @@ namespace boost { namespace type_of {
BOOST_PP_ENUM_PARAMS(\
BOOST_PP_SEQ_SIZE(Params),\
P)> >\
: boost::type_of::push_back<V, boost::mpl::size_t<ID> >\
: boost::type_of::push_back<V, boost::mpl::size_t<ID> >\
{\
};\
template<class Iter> struct decode_template_impl<boost::mpl::size_t<ID>, Iter>\
template<class Iter> struct decode_template_impl<boost::mpl::size_t<ID>, Iter>\
{\
BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_TYPEDEF_INT_PN,_)\
typedef Name<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER) > type;\

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
#define BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
@ -8,18 +8,18 @@
#define BOOST_TYPEOF_REGISTER_TYPE_IMPL(T, Id) \
\
template<class V> struct encode_type_impl<V, T > \
: boost::type_of::push_back<V, boost::mpl::size_t<Id> > \
: boost::type_of::push_back<V, boost::mpl::size_t<Id> > \
{}; \
template<class Iter> struct decode_type_impl<boost::mpl::size_t<Id>, Iter> \
template<class Iter> struct decode_type_impl<boost::mpl::size_t<Id>, Iter> \
{ \
typedef T type; \
typedef Iter iter; \
};
#define BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, Id) \
BOOST_TYPEOF_BEGIN_ENCODE_NS \
BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
BOOST_TYPEOF_END_ENCODE_NS
BOOST_TYPEOF_BEGIN_ENCODE_NS \
BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
BOOST_TYPEOF_END_ENCODE_NS
#define BOOST_TYPEOF_REGISTER_TYPE(Type) \
BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, BOOST_TYPEOF_UNIQUE_ID())

View File

@ -1,6 +1,6 @@
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
@ -19,13 +19,13 @@
// TYPE_PARAM "virtual functions" implementation
#define BOOST_TYPEOF_TYPE_PARAM_ENCODE(This, n)\
typedef typename boost::type_of::encode_type<\
typedef typename boost::type_of::encode_type<\
BOOST_PP_CAT(V, n),\
BOOST_PP_CAT(P, n)\
>::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
#define BOOST_TYPEOF_TYPE_PARAM_DECODE(This, n)\
typedef boost::type_of::decode_type< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
typedef boost::type_of::decode_type< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_TYPEOF_HPP_INCLUDED
#define BOOST_TYPEOF_TYPEOF_HPP_INCLUDED
@ -126,7 +126,7 @@
#ifdef BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_TEXT "using typeof emulation"
# include <boost/typeof/message.hpp>
# include <boost/typeof/message.hpp>
# include <boost/typeof/typeof_impl.hpp>
# include <boost/typeof/type_encoding.hpp>
# include <boost/typeof/template_encoding.hpp>
@ -137,7 +137,7 @@
#elif defined(BOOST_TYPEOF_NATIVE)
# define BOOST_TYPEOF_TEXT "using native typeof"
# include <boost/typeof/message.hpp>
# include <boost/typeof/message.hpp>
# include <boost/typeof/native.hpp>
#else
# error typeof configuration error

View File

@ -1,7 +1,7 @@
// Copyright (C) 2004, 2005 Arkadiy Vertleyb
// Copyright (C) 2005 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// 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_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
#define BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
@ -35,15 +35,15 @@ namespace boost { namespace type_of {
//
namespace boost { namespace type_of {
template<class V, class T>
typename enable_if<
typename is_function<T>::type,
sizer<typename encode_type<V, T>::type> >::type encode(T&);
template<class V, class T>
typename enable_if<
typename is_function<T>::type,
sizer<typename encode_type<V, T>::type> >::type encode(T&);
template<class V, class T>
typename disable_if<
typename is_function<T>::type,
sizer<typename encode_type<V, T>::type> >::type encode(const T&);
template<class V, class T>
typename disable_if<
typename is_function<T>::type,
sizer<typename encode_type<V, T>::type> >::type encode(const T&);
}}
//