mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 08:50:46 +07:00
87095f7dde
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 <wangnan0@huawei.com> Cc: Alexei Starovoitov <ast@fb.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1474874832-134786-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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;
|
|
}
|