mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-03-20 11:55:02 +08:00
support bazel complie this project and format code.
This commit is contained in:
13
learn_class/modern_cpp_30/SFINAE/sfinae paper/p2SFINAE.cpp
Normal file
13
learn_class/modern_cpp_30/SFINAE/sfinae paper/p2SFINAE.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by light on 20-1-6.
|
||||
//
|
||||
|
||||
|
||||
// The compiler will be really unhappy when it will later discover the call to hahahaICrash.
|
||||
// 当以后发现对hahahaICrash的调用时,编译器将非常不满意。
|
||||
template <typename T> void f(T t) { t.hahahaICrash(); }
|
||||
void f(...) { } // The sink-hole wasn't even considered.
|
||||
|
||||
int main() {
|
||||
f(1);
|
||||
}
|
||||
Reference in New Issue
Block a user