We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cec5700 commit 459538cCopy full SHA for 459538c
1 file changed
build/has_addr2line.cpp
@@ -1,11 +1,10 @@
1
-// Copyright Antony Polukhin, 2016-2020.
+// Copyright Antony Polukhin, 2016-2025.
2
//
3
// Distributed under the Boost Software License, Version 1.0. (See
4
// accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
7
#include <cstdlib>
8
-#include <string>
9
10
#include <boost/config.hpp>
11
#include <unwind.h>
@@ -15,11 +14,10 @@
15
14
int main() {
16
17
#ifdef BOOST_STACKTRACE_ADDR2LINE_LOCATION
18
- std::string s = BOOST_STRINGIZE( BOOST_STACKTRACE_ADDR2LINE_LOCATION );
19
- s += " -h";
+ const char* s = BOOST_STRINGIZE( BOOST_STACKTRACE_ADDR2LINE_LOCATION ) " -h";
20
#else
21
- std::string s = "/usr/bin/addr2line -h";
+ const char* s = "/usr/bin/addr2line -h";
22
#endif
23
24
- return std::system(s.c_str());
+ return std::system(s);
25
}
0 commit comments