Is it possible to initialize a boost::unordered_map with a initialization list? -Weffc++ requires it.
I can’t use a method to initialize it because I only fill the map after some processing inside the constructor. I could create an empty map inside a method and return it, but that doesn’t sound like a good idea to me.
I could use a pointer too and initialize it to NULL. I’d rather not though it’s better than creating the equivalent of an empty method.
Just default-construct the member variable in the initialization list:
This is enough to make
-Weffc++shut up.