Last active
December 21, 2017 19:36
-
-
Save Marqin/0891b211f118739c9d2683ef77649cec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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