|
@@ -8,6 +8,9 @@ function _iostreams(package, snippets)
|
|
|
[[
|
|
|
#include <boost/iostreams/filter/zstd.hpp>
|
|
|
#include <boost/iostreams/filtering_stream.hpp>
|
|
|
+ #if defined(BOOST_NO_EXCEPTIONS)
|
|
|
+ namespace boost { BOOST_NORETURN inline void throw_exception(std::exception const & e) {} }
|
|
|
+ #endif
|
|
|
void test() {
|
|
|
boost::iostreams::filtering_ostream out;
|
|
|
out.push(boost::iostreams::zstd_compressor());
|
|
@@ -21,6 +24,9 @@ function _iostreams(package, snippets)
|
|
|
[[
|
|
|
#include <boost/iostreams/filter/lzma.hpp>
|
|
|
#include <boost/iostreams/filtering_stream.hpp>
|
|
|
+ #if defined(BOOST_NO_EXCEPTIONS)
|
|
|
+ namespace boost { BOOST_NORETURN inline void throw_exception(std::exception const & e) {} }
|
|
|
+ #endif
|
|
|
void test() {
|
|
|
boost::iostreams::filtering_ostream out;
|
|
|
out.push(boost::iostreams::lzma_compressor());
|
|
@@ -36,6 +42,9 @@ function _filesystem(package, snippets)
|
|
|
[[
|
|
|
#include <boost/filesystem.hpp>
|
|
|
#include <iostream>
|
|
|
+ #if defined(BOOST_NO_EXCEPTIONS)
|
|
|
+ namespace boost { BOOST_NORETURN inline void throw_exception(std::exception const & e) {} }
|
|
|
+ #endif
|
|
|
void test() {
|
|
|
boost::filesystem::path path("/path/to/directory");
|
|
|
if (boost::filesystem::exists(path)) {
|
|
@@ -54,6 +63,9 @@ function _date_time(package, snippets)
|
|
|
table.insert(snippets,
|
|
|
[[
|
|
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
|
|
+ #if defined(BOOST_NO_EXCEPTIONS)
|
|
|
+ namespace boost { BOOST_NORETURN inline void throw_exception(std::exception const & e) {} }
|
|
|
+ #endif
|
|
|
void test() {
|
|
|
boost::gregorian::date d(2010, 1, 30);
|
|
|
}
|
|
@@ -68,6 +80,9 @@ function _header_only(package, snippets)
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
#include <string>
|
|
|
#include <vector>
|
|
|
+ #if defined(BOOST_NO_EXCEPTIONS)
|
|
|
+ namespace boost { BOOST_NORETURN inline void throw_exception(std::exception const & e) {} }
|
|
|
+ #endif
|
|
|
void test() {
|
|
|
std::string str("a,b");
|
|
|
std::vector<std::string> vec;
|
|
@@ -78,6 +93,9 @@ function _header_only(package, snippets)
|
|
|
table.insert(snippets,
|
|
|
[[
|
|
|
#include <boost/unordered_map.hpp>
|
|
|
+ #if defined(BOOST_NO_EXCEPTIONS)
|
|
|
+ namespace boost { BOOST_NORETURN inline void throw_exception(std::exception const & e) {} }
|
|
|
+ #endif
|
|
|
void test() {
|
|
|
boost::unordered_map<std::string, int> map;
|
|
|
map["2"] = 2;
|