Boost logo

Boost :

Subject: Re: [boost] [gsoc16]Interest in static map
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2016-01-15 07:09:45


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/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk