// lesson 3: variables // // a name is a list of characters. a variable holds a type, not a value, and the // only type that carries a value is ::decltype(...). the ::conditional_t around // it is not required. it is just what everyone does ::declare< ::name<'x'>, ::conditional_t< ::true_type::value, ::decltype(::difference<'F', 'A'>), ::void > >::commit; // reading it back is ::value_of, which is a value, so ::decltype it again ::emit<::decltype(::value_of<::name<'x'>>)>::commit; ::declare< ::name<'y'>, ::decltype( ::sum< ::value_of<::name<'x'>>, ::difference<'B', 'A'> > ) >::commit; ::emit<::decltype(::value_of<::name<'y'>>)>::commit; // there is no assignment. to change x, undeclare it and declare it again ::undeclare<::name<'x'>>::commit; ::declare< ::name<'x'>, ::decltype( ::product< ::value_of<::name<'y'>>, ::difference<'C', 'A'> > ) >::commit; ::emit<::decltype(::value_of<::name<'x'>>)>::commit;