aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/test_ports/vcpkg-ci-tomlplusplus/project/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-tomlplusplus/project/main.cpp')
-rw-r--r--vcpkg/scripts/test_ports/vcpkg-ci-tomlplusplus/project/main.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-tomlplusplus/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-tomlplusplus/project/main.cpp
new file mode 100644
index 0000000..3382010
--- /dev/null
+++ b/vcpkg/scripts/test_ports/vcpkg-ci-tomlplusplus/project/main.cpp
@@ -0,0 +1,22 @@
+#include <iostream>
+#include <toml++/toml.hpp>
+
+int main(int argc, char** argv)
+{
+ if (argc < 2)
+ return 1;
+
+ try
+ {
+ toml::table tbl;
+ tbl = toml::parse_file(argv[1]);
+ std::cout << tbl << "\n";
+ }
+ catch (const toml::parse_error& err)
+ {
+ std::cerr << "Parsing failed: " << err << "\n";
+ return 2;
+ }
+
+ return 0;
+}