Class: Benchcc::MPL::Vector

Inherits:
Sequence
  • Object
show all
Defined in:
lib/benchcc/mpl.rb

Instance Method Summary collapse

Methods inherited from Sequence

#includes

Instance Method Details

#headersObject



29
# File 'lib/benchcc/mpl.rb', line 29

def headers; super 'vector'; end

#to_sObject



21
22
23
24
25
26
27
# File 'lib/benchcc/mpl.rb', line 21

def to_s
  initial, rest = map(&:to_s).take(50), map(&:to_s).drop(50)
  vectorN = "boost::mpl::vector#{initial.size}<#{initial.join(', ')}>"
  rest.reduce(vectorN) do |tail, x|
    "boost::mpl::v_item<#{x}, #{tail}, 0>" # we emulate mpl::push_back
  end
end