ArgumentList 0.2.1

Hello everyone, this is just a minor update of the ArgumentList class.

Two are the differences between this one and the previous version:

  1. CMake will now produce also the “install” directive for Make
  2. The getSwitchArgument() method, instead of returning a zero in case of failure, will throw a std::exception

So it will be safe, from now on, to call the getSwitchArgument method inside a try/catch block, like in the following example:

int i(0);
float f(0.0);
try {
    i = args.getSwitchArgument< int >("-i");
    f = args.getSwitchArgument< float >("-f");
}
catch (std::exception) {
    std::cerr << "Ops :)" << std::endl;
}

The new version or ArgumentList can be downloaded from this link.

Related posts:

  1. ArgumentList 0.2
  2. ArgumentList 0.1
  3. OpenCL memset

Tags: ,

Leave a Reply