16 #define MYSTRING(x) #x 18 std::cout <<
"check condition:" <<
MYSTRING(n > 10) << std::endl;
19 std::cout <<
"in file: " << __FILE__ << std::endl;
20 std::cout <<
"function name: " << __func__ << std::endl;
21 std::cout <<
"pretty function name: " << __PRETTY_FUNCTION__ << std::endl;
22 std::cout <<
"at line: " << __LINE__ << std::endl;
24 std::cout <<
"is true" << std::endl;
26 std::cout <<
"is false" << std::endl;
34 #define ALL(x) std::begin(x), std::end(x) 35 std::list<double> lst(10);
36 std::generate_n(lst.begin(), lst.size(), []() {
40 auto fitr = std::find_if(
ALL(lst), [](
double x) {
return x > 5; });
41 std::copy(lst.begin(), fitr, std::ostream_iterator<double>(std::cout,
","));
42 std::cout << std::endl;
43 std::copy(
ALL(lst), std::ostream_iterator<double>(std::cout,
","));
void ex1()
ex1 Präprozessor-Anweisungen