Apparatus and method to compile a variadic template function
Abstract:
An apparatus duplicates a process code of a variadic template function that has a variable number of parameters in a source code, in association with each of actual arguments in an actual-argument list corresponding to a variadic parameter defined by a variadic operator that packs the variable number of parameters of the variadic template function. The apparatus substitutes another parameter in each duplicated process code with a prepared parameter that accepts the actual argument associated with the each duplicated process code. The apparatus firstly inserts, into a recursive call part in a process code of the variadic template function, a first duplicated process code that is associated with an actual argument at a head of the actual-argument list, and repeats inserting, into a recursive call part in the previously inserted duplicated process code, a next duplicated process code associated with a subsequent actual argument.
Public/Granted literature
Information query
Patent Agency Ranking
0/0