File: Source_location_default_argument.cc

package info (click to toggle)
seastar 25.05.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 7,256 kB
  • sloc: cpp: 89,250; python: 5,066; ansic: 3,452; sh: 1,272; xml: 177; makefile: 9
file content (10 lines) | stat: -rw-r--r-- 249 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#include<source_location>

int test_source_location(int line,
                         std::source_location loc = std::source_location::current()) {
    return line == loc.line() ? 0 : 1;
}

int main() {
    return test_source_location(__LINE__);
}