Changed string view related __cplusplus check to > 201402L, and reverted additional travis tests to reduce the CI duration
This commit is contained in:
parent
7bf465362a
commit
bd9c1192bb
2 changed files with 11 additions and 13 deletions
10
.travis.yml
10
.travis.yml
|
|
@ -18,13 +18,5 @@ script:
|
|||
rm -r * &&
|
||||
CXX=g++ cmake -DUSE_STANDALONE_ASIO=ON -DCMAKE_CXX_FLAGS=\"-Werror -O3\" .. &&
|
||||
make &&
|
||||
CTEST_OUTPUT_ON_FAILURE=1 make test &&
|
||||
rm -r * &&
|
||||
CXX=g++ cmake -DCMAKE_CXX_FLAGS=\"-Werror -std=c++17 -O3\" .. &&
|
||||
make &&
|
||||
CTEST_OUTPUT_ON_FAILURE=1 make test &&
|
||||
rm -r * &&
|
||||
CXX=g++ cmake -DUSE_STANDALONE_ASIO=ON -DCMAKE_CXX_FLAGS=\"-Werror -std=c++17 -O3\" .. &&
|
||||
make &&
|
||||
CTEST_OUTPUT_ON_FAILURE=1 make test
|
||||
CTEST_OUTPUT_ON_FAILURE=1 make test
|
||||
"
|
||||
|
|
|
|||
|
|
@ -29,14 +29,20 @@ namespace SimpleWeb {
|
|||
} // namespace SimpleWeb
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201402L || (defined(_MSC_VER) && _MSC_VER >= 1910)
|
||||
#if __cplusplus > 201402L || (defined(_MSC_VER) && _MSC_VER >= 1910)
|
||||
#include <string_view>
|
||||
namespace SimpleWeb { using string_view = std::string_view; }
|
||||
namespace SimpleWeb {
|
||||
using string_view = std::string_view;
|
||||
}
|
||||
#elif !defined(USE_STANDALONE_ASIO)
|
||||
#include <boost/utility/string_ref.hpp>
|
||||
namespace SimpleWeb { using string_view = boost::string_ref; }
|
||||
namespace SimpleWeb {
|
||||
using string_view = boost::string_ref;
|
||||
}
|
||||
#else
|
||||
namespace SimpleWeb { using string_view = const std::string &; }
|
||||
namespace SimpleWeb {
|
||||
using string_view = const std::string &;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace SimpleWeb {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue