MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / operator[]

Method operator[]

tests/BS_thread_pool_test.cpp:3882–3887  ·  view source on GitHub ↗

* @brief Check if a specific command line argument has been passed to the program. If no arguments were passed, use the default value instead. * * @param arg The argument to check for. * @return `true` if the argument exists, `false` otherwise. */

Source from the content-addressed store, hash-verified

3880 * @return `true` if the argument exists, `false` otherwise.
3881 */
3882 [[nodiscard]] bool operator[](const std::string_view arg)
3883 {
3884 if (size() > 0)
3885 return (args.count(arg) == 1);
3886 return allowed[arg].def;
3887 }
3888
3889 /**
3890 * @brief Add an argument to the list of allowed arguments.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected