cjlove / config-cpp Goto Github PK
View Code? Open in Web Editor NEWC++ Configuration management library inspired by the Viper package for golang.
License: Apache License 2.0
C++ Configuration management library inspired by the Viper package for golang.
License: Apache License 2.0
The following should establish a default value provided that there is no subkey
in the top-level dictionary for JSON or YAML.
config.SetDefault("key.subkey","value");
Candidate libraries for TOML support:
Older alternatives:
There is a stray jsonHandler.cpp
in `src/Makefile' which makes it impossible to build without the JSON library available:
set (config-cpp_SRC
config-cpp.cpp
jsonHandler.cpp <-----
util.cpp
value.cpp
event.cpp
notification.cpp
filesystemEvent.cpp
inotify.cpp
)
cxxopts::OptionParseException deprecated in newest version of cxxopts
cuase the compiling error as follow:
config-cpp.cpp: In member function ‘bool ConfigCpp::ConfigCpp::ReadInConfig()’:
config-cpp.cpp:176:27: error: ‘OptionParseException’ in namespace ‘cxxopts’ does not name a type
176 | } catch (cxxopts::OptionParseException &e) {
| ^~~~~~~~~~~~~~~~~~~~
config-cpp.cpp:178:39: error: ‘e’ was not declared in this scope
178 | std::cout << "Error: " << e.what() << "\n";
| ^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-predefined-identifier-outside-function’
find_package(cxxopts 1.2.0 REQUIRED)
cxxopts 1.2.0 is incompatible with the usage of Options::parse in config-cpp.cpp.
cxxopts v1.2.0 has return type of void for Options::parse
v2.0.0 and up has return type of ParseResult for Options::parse, which is what config-cpp needs.
Candidate libraries for parsing .ini files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.