Skip to content

Instantly share code, notes, and snippets.

#include <boost/describe.hpp>
#include <boost/mp11.hpp>
#include <vector>
#include <variant>
using namespace boost::describe;
//namespace app {
template<class T,
#include <boost/describe.hpp>
#include <boost/mp11.hpp>
#include <boost/test/unit_test.hpp>
#include <ostream>
#include <sstream>
namespace My {
struct PseudoVariant { // not described
#include <boost/describe.hpp>
#include <boost/mp11.hpp>
#include <vector>
#include <variant>
using namespace boost::describe;
namespace app
{
template<class T,
#include <boost/describe.hpp>
#include <boost/mp11.hpp>
#include <boost/container_hash/hash.hpp>
#include <variant>
using namespace boost::describe;
namespace app
{
> help
"Enter a variable name ('x', 'y', 'v', or 'm') to print its value; enter variable=value to assign a new value to a variable. Values are in JSON format."
> x
1
> x="foo"
Error: not a number
#include <boost/describe.hpp>
#include <boost/mp11.hpp>
#include <boost/json.hpp>
#include <boost/utility/string_view.hpp>
#include <string>
#include <stdexcept>
#include <iostream>
// get variable