1 namespace enable_if_attrs { fn1()2constexpr int fn1() __attribute__((enable_if(0, ""))) { return 0; } fn1()3constexpr int fn1() { return 1; } 4 fn2()5constexpr int fn2() { return 1; } fn2()6constexpr int fn2() __attribute__((enable_if(0, ""))) { return 0; } 7 fn3(int i)8constexpr int fn3(int i) __attribute__((enable_if(!i, ""))) { return 0; } fn3(int i)9constexpr int fn3(int i) __attribute__((enable_if(i, ""))) { return 1; } 10 fn4(int i)11constexpr int fn4(int i) { return 0; } fn4(int i)12constexpr int fn4(int i) __attribute__((enable_if(i, ""))) { return 1; } 13 fn5(int i)14constexpr int fn5(int i) __attribute__((enable_if(i, ""))) { return 1; } fn5(int i)15constexpr int fn5(int i) { return 0; } 16 } 17 18 namespace pass_object_size_attrs { fn1(void * const a)19constexpr int fn1(void *const a __attribute__((pass_object_size(0)))) { 20 return 1; 21 } fn1(void * const a)22constexpr int fn1(void *const a) { return 0; } 23 fn2(void * const a)24constexpr int fn2(void *const a) { return 0; } fn2(void * const a)25constexpr int fn2(void *const a __attribute__((pass_object_size(0)))) { 26 return 1; 27 } 28 } 29