Hi,
I am trying to understand std::functions, so I tried the following:
auto bp = sf::Mouse::isButtonPressed;
and that works fine.
I tried the something similar:
auto gp = sf::Mouse::getPosition;
and it gave me the error
unable to deduce 'auto' from 'sf::Mouse::getPosition'
when I switched
auto
to
std::function<sf::Vector2i(const sf::Window&)>
I got
error: conversion from '<unresolved overloaded function type>' to non-scalar type 'std::function<sf::Vector2<int>(const sf::Window&)>' requested
What am I doing wrong? I am sure, I am misunderstanding this whole concept, but I find it wierd, that the first one worked without a problem and the other one didn't. Is it because of the overload?