1

remove nonessential stuff

- rules_docker
- boost
... and their deps.
This commit is contained in:
2021-06-03 18:53:09 +03:00
committed by Motiejus Jakštys
parent ef205f7b00
commit d461cf1dcc
4 changed files with 5 additions and 143 deletions

View File

@@ -1,35 +1,9 @@
load("@io_bazel_rules_docker//cc:image.bzl", "cc_image")
cc_binary(
name = "hello",
srcs = ["hello.cpp"],
)
cc_image(
name = "hello_image",
binary = ":hello",
)
cc_binary(
name = "boost_exception",
srcs = ["boost_exception.cpp"],
copts = ["-fexceptions", "-frtti"],
deps = [
"@boost//:lexical_cast",
],
)
cc_image(
name = "boost_exception_image",
binary = ":boost_exception",
)
cc_binary(
name = "exception",
srcs = ["exception.cpp"],
)
cc_image(
name = "exception_image",
binary = ":exception",
)

View File

@@ -1,20 +0,0 @@
#include <iostream>
#include <boost/lexical_cast.hpp>
int main() {
std::cout << "about to cast \"1\" to double!" << std::endl;
std::cout << boost::lexical_cast<double>("1") << std::endl;
std::cout << "about to cast \"z\" to double, but expecting to catch bad_lexical_cast" << std::endl;
try {
std::cout << boost::lexical_cast<double>("z");
std::cout << "uh-oh, should have thrown an exception before here." << std::endl;
} catch (const boost::bad_lexical_cast &e) {
std::cout << "caught bad_lexical_cast" << std::endl;
}
std::cout << "about to cast \"z\" to double, should see an uncaught exception." << std::endl;
std::cout << boost::lexical_cast<double>("z");
std::cout << "uh-oh, should have thrown an exception before here." << std::endl;
}