Skip to content

CommandlineProcessing::sliceCommandLineForSource

Build a per‐translation‐unit argv without changing ordered option state.

Synopsis

Declared in <commandlineProcessing/commandline_processing.h>

[[visibility]]
std::vector<std::string>
sliceCommandLineForSource(
    std::vector<std::string> const& argv,
    std::vector<std::string> const& sourceFiles,
    std::string const& source);

Description

Only positional source operands other than source are removed. In particular, option operands, linker inputs, ‐‐, and all ordered ‐x switches are retained exactly.

Return Value

A standard container which offers fixed time access to individual elements in any order.

Parameters

Name

Description

argv

A standard container which offers fixed time access to individual elements in any order.

sourceFiles

A standard container which offers fixed time access to individual elements in any order.

Created with MrDocs