Modify

Opened 6 years ago

Closed 6 years ago

#7673 closed Support Requests (wontfix)

BOOST_RATIO_STATIC_ASSERT: constant "X" is not a type name

Reported by: kindr@… Owned by: viboes
Milestone: To Be Determined Component: ratio
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

Whily compiling a code with icc that uses boost, I get this error:

/home/ac/sroy8/boost_1_52_0/boost/ratio/detail/overflow_helpers.hpp(77): error: constant "X" is not a type name
        BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_ADD, ());
        ^

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by viboes

Description: modified (diff)
Milestone: Boost 1.52.0To Be Determined
Severity: ShowstopperProblem
Status: newassigned

Well X is defined as a parameter

  template <boost::intmax_t X, boost::intmax_t Y>
  class br_add<X, Y, 1>
  {
      static const boost::intmax_t min = boost::integer_traits<boost::intmax_t>::const_min;
      static const boost::intmax_t max = boost::integer_traits<boost::intmax_t>::const_max;

      BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_ADD, ());
  public:
      static const boost::intmax_t value = X + Y;
  };

I don't know how to fix this other than commenting the line for your compiler. Patches are welcome. Please provide the explicit compiler version.

comment:2 Changed 6 years ago by viboes

Resolution: wontfix
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.