Question: I have a pandas data frame from which I'm trying to create a dictionary based on a users age, where age is the key and the data associated with it is the value. So lets say users with age 10 will be in a dictionary {Age:10, Data:[Pole, Carl]}

[Table Image](https://i.stack.imgur.com/utCnQ.png)

Answer: 
As @HolyBlackCat commented, you can use concepts to simplify the function signature

```
#include <type_traits>

template<typename T>
  requires (!std::is_lvalue_reference_v<T>)
auto f(T&&) {}

```

Or detect lvalue or rvalue by checking the validity of a lambda expression that accepts an lvalue reference

```
#include <utility>

template<typename T>
  requires (!requires (T&& x) { [](auto&){}(std::forward<T>(x)); })
auto f(T&&) {}

```
You can use `static_assert` if you don't need SFINAE:

```
template<typename T>
auto f(T&&) {
    static_assert(std::is_rvalue_reference_v<T&&>);
}

```