Opened 11 years ago

Closed 11 years ago

#5901 closed Bugs (fixed)

Suppressing warnings from Cray compiler

Reported by: John Maddock Owned by: Eric Niebler
Milestone: To Be Determined Component: proto
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: marshall.galbraith@…

Description

While helping sort out Boost.Config support for the Cray compiler, this patch also came my way - it suppresses a bunch of warnings from the Cray compiler on account of macro continuation characters (\) not being on the end of the line:

Index: repeat.hpp =================================================================== --- repeat.hpp (revision 74374) +++ repeat.hpp (working copy) @@ -105,21 +105,21 @@

Generate BOOST_PROTO_MAX_ARITY-1 overloads of the following construct() function template.

-#define M0(N, typename_A, A_const_ref, A_const_ref_a, ref_a) \ -template<typename T, typename_A(N)> \ -typename proto::result_of::make_expr< \

  • proto::tag::function \
  • , construct_helper<T> \
  • , A_const_ref(N) \

->::type const \ -construct(A_const_ref_a(N)) \ -{ \

  • return proto::make_expr< \
  • proto::tag::function \
  • >( \
  • construct_helper<T>() \
  • , ref_a(N) \
  • ); \

+#define M0(N, typename_A, A_const_ref, A_const_ref_a, ref_a) \ +template<typename T, typename_A(N)> \ +typename proto::result_of::make_expr< \ + proto::tag::function \ + , construct_helper<T> \ + , A_const_ref(N) \ +>::type const \ +construct(A_const_ref_a(N)) \ +{ \ + return proto::make_expr< \ + proto::tag::function \ + >( \ + construct_helper<T>() \ + , ref_a(N) \ + ); \

} BOOST_PROTO_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, M0) #undef M0

@@ -215,22 +215,22 @@

Generate BOOST_PROTO_MAX_ARITY-1 overloads of the following construct() function template.

-#define BOOST_PROTO_LOCAL_MACRO(N, typename_A, A_const_ref, \

  • A_const_ref_a, ref_a) \

-template<typename T, typename_A(N)> \ -typename proto::result_of::make_expr< \

  • proto::tag::function \
  • , construct_helper<T> \
  • , A_const_ref(N) \

->::type const \ -construct(A_const_ref_a(N)) \ -{ \ +#define BOOST_PROTO_LOCAL_MACRO(N, typename_A, A_const_ref, \ + A_const_ref_a, ref_a) \ +template<typename T, typename_A(N)> \ +typename proto::result_of::make_expr< \ + proto::tag::function \ + , construct_helper<T> \ + , A_const_ref(N) \ +>::type const \ +construct(A_const_ref_a(N)) \ +{ \

return proto::make_expr< \

  • proto::tag::function \
  • >( \
  • construct_helper<T>() \
  • , ref_a(N) \
  • ); \

+ proto::tag::function \ + >( \ + construct_helper<T>() \ + , ref_a(N) \ + ); \

} #define BOOST_PROTO_LOCAL_LIMITS (1, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY)) #include BOOST_PROTO_LOCAL_ITERATE()

Change History (1)

comment:1 by Eric Niebler, 11 years ago

Resolution: fixed
Status: newclosed

(In [74467]) merge [74466] from trunk, fixes #5901

Note: See TracTickets for help on using tickets.