    #include <iostream>

    struct A { int x; constexpr A(int i) noexcept : x{i} {} };
    struct B { A a; constexpr B(A a) noexcept : a{a} {} };

    constexpr int foo() { 
        B b{55};
        return b.a.x;
    }

    template<int N>
    void output()
    {
        std::cout << N << std::endl;
    }

    int main() {
        // to be absolutely sure compile time eval'd,
        // pass as template arg
        constexpr auto b = foo();
        output<b>();
    }