remove nonessential stuff
- rules_docker - boost ... and their deps.
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user