fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <typename _valueType>
  5. struct RGBAColorData {
  6. using ValueType = _valueType;
  7. ValueType components[4];
  8. ValueType &r=components[0], &g=components[1], &b=components[2], &a=components[3];
  9. };
  10. int main() {
  11. RGBAColorData<int> color;
  12. color.r = 127;
  13. color.components[1]=333;
  14. cout << color.components[0]<<" "<<color.g<<endl;
  15. // your code goes here
  16. return 0;
  17. }
Success #stdin #stdout 0s 4276KB
stdin
Standard input is empty
stdout
127 333