From dff8a5c505e56ca636aabed196dc3bbd49427ea4 Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Thu, 27 Jul 2006 11:48:49 +0000 Subject: [PATCH] boost guidelines (mainly from inspect tool: tabs, license reference text, etc.); more to do... [SVN r34753] --- include/boost/typeof/encode_decode.hpp | 22 +++---- include/boost/typeof/encode_decode_params.hpp | 10 +-- .../boost/typeof/integral_template_param.hpp | 8 +-- include/boost/typeof/modifiers.hpp | 16 ++--- .../typeof/register_functions_iterate.hpp | 64 +++++++++---------- include/boost/typeof/template_encoding.hpp | 10 +-- .../boost/typeof/template_template_param.hpp | 12 ++-- include/boost/typeof/type_encoding.hpp | 14 ++-- include/boost/typeof/type_template_param.hpp | 8 +-- include/boost/typeof/typeof.hpp | 8 +-- include/boost/typeof/typeof_impl.hpp | 20 +++--- 11 files changed, 96 insertions(+), 96 deletions(-) diff --git a/include/boost/typeof/encode_decode.hpp b/include/boost/typeof/encode_decode.hpp index 8464fde..2612f78 100755 --- a/include/boost/typeof/encode_decode.hpp +++ b/include/boost/typeof/encode_decode.hpp @@ -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 +# include #endif @@ -40,8 +40,8 @@ BOOST_TYPEOF_END_ENCODE_NS namespace boost { namespace type_of { - template - struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl + template + struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl {}; template diff --git a/include/boost/typeof/encode_decode_params.hpp b/include/boost/typeof/encode_decode_params.hpp index fd9e59b..640bfdc 100755 --- a/include/boost/typeof/encode_decode_params.hpp +++ b/include/boost/typeof/encode_decode_params.hpp @@ -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 decode##n; \ + typedef boost::type_of::decode_type 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 >::type \ + typename boost::type_of::push_back >::type \ BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~) #endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED diff --git a/include/boost/typeof/integral_template_param.hpp b/include/boost/typeof/integral_template_param.hpp index 4e887df..8543be7 100755 --- a/include/boost/typeof/integral_template_param.hpp +++ b/include/boost/typeof/integral_template_param.hpp @@ -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_PP_CAT(d, n);\ + typedef boost::type_of::decode_integral 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)); diff --git a/include/boost/typeof/modifiers.hpp b/include/boost/typeof/modifiers.hpp index f1498aa..cfb276b 100755 --- a/include/boost/typeof/modifiers.hpp +++ b/include/boost/typeof/modifiers.hpp @@ -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 struct encode_type_impl\ {\ typedef\ - typename boost::type_of::encode_type<\ + typename boost::type_of::encode_type<\ typename boost::type_of::push_back<\ V\ - , boost::mpl::size_t >::type\ + , boost::mpl::size_t >::type\ , T>::type\ type;\ };\ - template struct decode_type_impl, Iter>\ + template struct decode_type_impl, Iter>\ {\ typedef boost::type_of::decode_type 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 >::type\ - , boost::mpl::size_t >::type\ + , boost::mpl::size_t >::type\ + , boost::mpl::size_t >::type\ , T>::type\ type;\ };\ template\ - struct decode_type_impl, Iter>\ + struct decode_type_impl, Iter>\ {\ enum{n = Iter::type::value};\ typedef boost::type_of::decode_type d;\ diff --git a/include/boost/typeof/register_functions_iterate.hpp b/include/boost/typeof/register_functions_iterate.hpp index f381b5d..643dc98 100755 --- a/include/boost/typeof/register_functions_iterate.hpp +++ b/include/boost/typeof/register_functions_iterate.hpp @@ -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 @@ -26,41 +26,41 @@ struct decode_type_impl, Iter> #ifndef BOOST_TYPEOF_NO_FUNCTION_TYPES - // function references + // function references - template - struct encode_type_impl - { - typedef R BOOST_PP_CAT(P, n); - typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_ID + n) type; - }; + template + struct encode_type_impl + { + typedef R BOOST_PP_CAT(P, n); + typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_ID + n) type; + }; - template - struct decode_type_impl, 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 + struct decode_type_impl, 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 - struct encode_type_impl - { - typedef R BOOST_PP_CAT(P, n); - typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_ID + n) type; - }; + template + struct encode_type_impl + { + typedef R BOOST_PP_CAT(P, n); + typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_ID + n) type; + }; - template - struct decode_type_impl, 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 + struct decode_type_impl, 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 diff --git a/include/boost/typeof/template_encoding.hpp b/include/boost/typeof/template_encoding.hpp index 322147f..1a638ed 100755 --- a/include/boost/typeof/template_encoding.hpp +++ b/include/boost/typeof/template_encoding.hpp @@ -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\ struct encode_type_impl >\ {\ - typedef typename boost::type_of::push_back >::type V0;\ + typedef typename boost::type_of::push_back >::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 diff --git a/include/boost/typeof/template_template_param.hpp b/include/boost/typeof/template_template_param.hpp index f88365d..3a26639 100755 --- a/include/boost/typeof/template_template_param.hpp +++ b/include/boost/typeof/template_template_param.hpp @@ -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 struct encode_template - : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl + template struct encode_template + : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl {}; template 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 >\ + : boost::type_of::push_back >\ {\ };\ - template struct decode_template_impl, Iter>\ + template struct decode_template_impl, Iter>\ {\ BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_TYPEDEF_INT_PN,_)\ typedef Name type;\ diff --git a/include/boost/typeof/type_encoding.hpp b/include/boost/typeof/type_encoding.hpp index 130bd2a..f8c74ed 100755 --- a/include/boost/typeof/type_encoding.hpp +++ b/include/boost/typeof/type_encoding.hpp @@ -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 struct encode_type_impl \ - : boost::type_of::push_back > \ + : boost::type_of::push_back > \ {}; \ - template struct decode_type_impl, Iter> \ + template struct decode_type_impl, 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()) diff --git a/include/boost/typeof/type_template_param.hpp b/include/boost/typeof/type_template_param.hpp index d0bb77f..28a860c 100755 --- a/include/boost/typeof/type_template_param.hpp +++ b/include/boost/typeof/type_template_param.hpp @@ -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)); diff --git a/include/boost/typeof/typeof.hpp b/include/boost/typeof/typeof.hpp index c206354..10d8a0a 100755 --- a/include/boost/typeof/typeof.hpp +++ b/include/boost/typeof/typeof.hpp @@ -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 +# include # include # include # include @@ -137,7 +137,7 @@ #elif defined(BOOST_TYPEOF_NATIVE) # define BOOST_TYPEOF_TEXT "using native typeof" -# include +# include # include #else # error typeof configuration error diff --git a/include/boost/typeof/typeof_impl.hpp b/include/boost/typeof/typeof_impl.hpp index 1fd661a..aa62cf6 100755 --- a/include/boost/typeof/typeof_impl.hpp +++ b/include/boost/typeof/typeof_impl.hpp @@ -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 - typename enable_if< - typename is_function::type, - sizer::type> >::type encode(T&); + template + typename enable_if< + typename is_function::type, + sizer::type> >::type encode(T&); - template - typename disable_if< - typename is_function::type, - sizer::type> >::type encode(const T&); + template + typename disable_if< + typename is_function::type, + sizer::type> >::type encode(const T&); }} //