skarupke / flat_hash_map

A very fast hashtable
1.69k stars 186 forks source link

constexpr problem in Visual Studio 2015 #6

Closed pembeci closed 6 years ago

pembeci commented 6 years ago

I am getting an "expression did not evaluate to a constant" error on line 217 in Visual Studio 2015 Update 3:

213    template<typename T>
214    struct EntryDefaultTable
215    {
216        static constexpr const sherwood_v3_entry_constexpr<T> table[min_lookups] =
217        {
218            {}, {}, {}, sherwood_v3_entry_constexpr<T>::special_end_entry()
219        };
220    };

I checked and Microsoft's constexpr support may be problematic for some kind of usages. They already fixed some bugs. So I was wondering if there is a workaround to this piece of code. Another possibility is may be I am missing a compile flag. Thanks.

skarupke commented 6 years ago

I got it to compile in VS2015 again. Let me know if it works for you now.

pembeci commented 6 years ago

We moved on to a different setup (non VS) so it may be hard for me to try it again but thanks any way.