I am trying to to understand `const_cast`.

In the example below, `items_` is a private member variable.

The method `getItems()` is a `const` method, which means that it cannot modify the member variable `items_`.

`getItems()` returns a `const vector` reference which means that you cannot modify the member variable `items_`.

My question is, is `const_cast` necessary here? I don't think so as I don't need to cast away constness?

```
#include <iostream>

class test {  
  std::vector<Item> items_;
public:
  const std::vector<Item>& getItems() const;
};

const std::vector<mv::Item>& mv::Workloads::getItems() const
{
  return const_cast<std::vector<Item>&>(items_);
}

```