Files
mp-units/test/metabench/make_dimension/no_concepts.cpp.erb
T
Mateusz Pusz 563b358d5e feat!: 💥 dimensionless quantities refactored
Dimensionless quantities are now represented by quantity types rather
than by plain representation types. Only dimensionless quantities with
`unitless` unit are implicitly convertible from representation types.

`units::exp()` now is a function doing std::exp() on a representation
type (previous `units::exp` class template was renamed to
`units::exponent`).

BREAKING_CHANGE: gcc-9.3 support removed
BREAKING_CHANGE: `exp` and `Exp` renamed to `exponent` and `Exponent`
Resolves #27
Resolves #42
2020-09-08 11:02:16 +02:00

24 lines
459 B
ERB

#include "dimension_no_concepts.h"
<% (1..100).each do |k| %>
struct test<%= k %> {
<% (1..n).each do |i| %>
static constexpr units::base_dimension dim<%= i %>{"dim<%= i %>"};
<% end %>
#if defined(METABENCH)
using dim = units::make_dimension_t<<%=
xs = ((1)..(n)).map { |j| "units::exponent<dim#{j}, 1>" }
rng = Random.new(k)
xs.shuffle(random: rng).join(', ')
%>>;
#else
using dim = void;
#endif
};
<% end %>
int main()
{
}