fork download
  1. extern int no_symbol;
  2.  
  3. constexpr float MyMin (float a, float b)
  4. {
  5. return a != a ? throw (no_symbol)
  6. : (a < b ? a : b) ;
  7. }
  8.  
  9. int main()
  10. {
  11. constexpr float m0 { MyMin(2.0f, 3.0f) }; // OK
  12.  
  13. float f1 { 2.0f };
  14.  
  15. float m1 { MyMin(f1, 3.0f) }; // linker error: undefined "no_symbol"
  16. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty