#include <iostream>

template <class T>
class Maybe {
    bool is_ = false;
    T value_;

  public:
    constexpr Maybe() = default;
    constexpr Maybe(T value) : is_(true), value_(value) {}

    constexpr bool is() const { return is_; }
};

Maybe<int> not_set_;
Maybe<int> is_set_(2);

template <const Maybe<int>& parm>
struct Test {
    void say() const {
        std::cout << "parm is " << (parm.is() ? "set" : "not set") << ".\n";
    }
};

int main() {
    Test<not_set_> not_set;
    Test<is_set_> is_set;

    not_set.say();
    is_set.say();
}
