Skip to content

Instantly share code, notes, and snippets.

@Marqin
Last active December 21, 2017 19:36
Show Gist options
  • Save Marqin/0891b211f118739c9d2683ef77649cec to your computer and use it in GitHub Desktop.
Save Marqin/0891b211f118739c9d2683ef77649cec to your computer and use it in GitHub Desktop.
#include <functional>
#include <string>
int foo (int a)
{
return a;
}
void foo (std::string s) {}
int main()
{
std::function<int(int)> func = foo;
}
// error: conversion from '<unresolved overloaded function type>' to non-scalar type 'std::function<int(int)>' requested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment