Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

THRUST_UNUSED undefined in thrust::tuple_for_each #970

@codecircuit

Description

@codecircuit
#include <thrust/detail/tuple_algorithms.h>

#include <tuple>

int main() {
	std::tuple<int, float> t;
	thrust::tuple_for_each(t, [](auto& e){e = 0;});
}

will fail to compile, because THRUST_UNUSED is undefined. I think this macro should prevent compiler warnings about unused variables, but also prevent some unwanted compiler optimizations. You can also search for THRUST_UNUSED in this repository and I only found it once in tuple_for_each_impl. Maybe you meant THRUST_UNUSED_VAR defined in thrust/system/cuda/config.h?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions