Skip to content

Instantly share code, notes, and snippets.

View anders-sjogren's full-sized avatar

Anders Sjögren anders-sjogren

View GitHub Profile
@anders-sjogren
anders-sjogren / main.cpp
Created December 15, 2014 12:10
Code showing the difference in lookup behaviour for functions and callable objects, in connection to argument-dependent lookup
#include <iostream>
#include <string>
namespace adl_ns {
struct X{};
std::string f(const X&){return "f from ADL namespace";}
std::string g(const X&){return "g from ADL namespace";}
}
namespace using_ns {