fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std::literals::string_literals;
  5.  
  6. int main() {
  7. if("It's a array!"s)
  8. std::cout << "truthy";
  9. else
  10. std::cout << "falsy";
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:7:21: error: could not convert 'std::literals::string_literals::operator""s(const char*, std::size_t)(13u)' from 'std::basic_string<char>' to 'bool'
  if("It's a array!"s)
                     ^
stdout
Standard output is empty