Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename T>
- struct Wrapper {
- Wrapper(T) {}
- void operator()() { }
- };
- template<typename T>
- Wrapper(T) -> Wrapper<T>;
- int main() {
- // works in gcc, not in clang
- Wrapper{int{}}();
- // works with both
- // Wrapper a{int{}}; a();
- }
Add Comment
Please, Sign In to add comment