• Clemens Hammacher's avatar
    [base] Accept several values for USE · 69e7be85
    Clemens Hammacher authored
    This CL changes the USE macro to accept more than one parameter.
    This is particularly interesting for calling a method on each type in a
    parameter pack, as in:
    
    template<typename... T>
    void foo(T&&... ts) {
      USE(do_something(ts)...);
    }
    
    Drive-by fix: Allow to pass arbitrary types to USE, including
    references. This might prevent a copy for pass-by-value.
    
    R=ishell@chromium.org, tebbi@chromium.org
    
    Also-by: tebbi@chromium.org
    Change-Id: I544e83bb996aaa638e7512295973dd3e742254bc
    Reviewed-on: https://chromium-review.googlesource.com/567507Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46626}
    69e7be85
platform-unittest.cc 5.45 KB