[gsoc16]Interest in static map

Hi Niall Douglas, I’m interested in the project static map and want to contribute to it in gsoc 2016. And I try to start with the programming competency test. Following is what I have done, https://github.com/ShangtongZhang/StaticMap/blob/master/main.cpp <https://github.com/ShangtongZhang/StaticMap/blob/master/main.cpp> Could you please give me some advice? In addition, I’m a little confused with // This should fail elegantly and usefully ... //constexpr std::array<unsigned, 0> string_hashes_fail = hash_strings(5); My understanding is that it will raise a run-time exception, is it right? Thanks, Shangtong Zhang, Senior Student, School of Computer Science, Fudan University, PRC.

On 14 Jan 2016 at 0:32, Shangtong Zhang wrote:
I’m interested in the project static map and want to contribute to it in gsoc 2016. And I try to start with the programming competency test. Following is what I have done, https://github.com/ShangtongZhang/StaticMap/blob/master/main.cpp <https://github.com/ShangtongZhang/StaticMap/blob/master/main.cpp> Could you please give me some advice?
A good attempt. However, I think you are over-thinking the problem. The solution I wrote is considerably shorter and more simple.
In addition, I’m a little confused with // This should fail elegantly and usefully ... //constexpr std::array<unsigned, 0> string_hashes_fail = hash_strings(5); My understanding is that it will raise a run-time exception, is it right?
An elegant and useful failure is a compiler error message whose first line exactly indicates the cause of the failure. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
participants (2)
-
Niall Douglas
-
Shangtong Zhang