mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
Check if g++ is available. The result will be used by builtin clang and LLVM support. Since LLVM requires C++11, this feature detector checks std::move(). Signed-off-by: Wang Nan <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: He Kuang <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Zefan Li <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
16 lines
239 B
C++
16 lines
239 B
C++
#include <iostream>
|
|
#include <memory>
|
|
|
|
static void print_str(std::string s)
|
|
{
|
|
std::cout << s << std::endl;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
std::string s("Hello World!");
|
|
print_str(std::move(s));
|
|
std::cout << "|" << s << "|" << std::endl;
|
|
return 0;
|
|
}
|