| 182 | } |
| 183 | |
| 184 | std::size_t index(std::size_t index) const { |
| 185 | if (index >= size()) { |
| 186 | throw IfcParse::IfcException( |
| 187 | "Index " + std::to_string(index) + " is out of range for variant of size " + std::to_string(size()) |
| 188 | ); |
| 189 | } |
| 190 | return size_and_indices_[index + 1]; |
| 191 | } |
| 192 | |
| 193 | template<typename T> |
| 194 | T& get(std::size_t index) { |