fork(53) download
  1. #include <cstddef>
  2.  
  3. template< size_t N >
  4. constexpr size_t length( char const (&)[N] )
  5. {
  6. return N-1;
  7. }
  8.  
  9. int main() {
  10.  
  11. static_assert( length("abc") == 3, "string length is not 3" );
  12.  
  13. // your code goes here
  14. return 0;
  15. }
Success #stdin #stdout 0s 3292KB
stdin
Standard input is empty
stdout
Standard output is empty