1a03dc8c9SPavel Labath #include "onetwo.h" 2a03dc8c9SPavel Labath 3a03dc8c9SPavel Labath struct InheritsFromOne : One { 4a03dc8c9SPavel Labath int member = 47; 5a03dc8c9SPavel Labath } inherits_from_one; 6a03dc8c9SPavel Labath 7a03dc8c9SPavel Labath struct InheritsFromTwo : Two { 8a03dc8c9SPavel Labath int member = 47; 9a03dc8c9SPavel Labath } inherits_from_two; 10a03dc8c9SPavel Labath 11b3b95287SPavel Labath struct OneAsMember { 12b3b95287SPavel Labath member::One one; 13b3b95287SPavel Labath int member = 47; 14b3b95287SPavel Labath } one_as_member; 15b3b95287SPavel Labath 16b3b95287SPavel Labath struct TwoAsMember { 17b3b95287SPavel Labath member::Two two; 18b3b95287SPavel Labath int member = 47; 19b3b95287SPavel Labath } two_as_member; 20b3b95287SPavel Labath 21b65d4b23SPavel Labath array::One array_of_one[3]; 22b65d4b23SPavel Labath array::Two array_of_two[3]; 23b65d4b23SPavel Labath get_one()241956cf10SPavel Labathresult::One get_one() { return result::One(124); } get_two()251956cf10SPavel Labathresult::Two get_two() { return result::Two(224); } 261956cf10SPavel Labath 27*fdc6aea3SPavel Labath // Note that there's also a function with the name func_shadow::One. 28*fdc6aea3SPavel Labath struct ShadowedOne : func_shadow::One { 29*fdc6aea3SPavel Labath int member = 47; 30*fdc6aea3SPavel Labath } shadowed_one; 31*fdc6aea3SPavel Labath main()321956cf10SPavel Labathint main() { return get_one().member; } 33