Boost logo

Boost :

Subject: [boost] [gsoc17] Project1: Static map: Can I implement the competency test in g++-7?
From: Vic Luo (vicluo96_at_[hidden])
Date: 2017-03-03 16:18:09


Hi,

I'm Zheng Luo, a third-year undergraduate from Shanghai Jiaotong
University who have special interest in C++ programming(especially for
templates). This is my second year of applying Google Summer of Code and
I'm willing to contribute to Static Map project mentioned on SoC2017
page. Previously I worked for a company as a C++ intern for months on
Chromium-related projects where I gained some experience about C++ in
industry.

And my question is, am I allowed to implement the competency test of
static_map in g++-7? I have just implemented my own version of
static_map which supports the following operations:

constexpr StaticMap<int, const char *, 3> m(make_pair(2, "abc"),
make_pair(4, "def"), make_pair(6, "ghi"));

    if (!m[4])
      abort();
    const char *foo = m[2];
    return 0;

which is compiled into assembly as:

main:
        xorl %eax, %eax
        ret

under g++-7 with -std=c++1z -O3

So I was wondering did I pass the test?

Thanks,

-- 
---------------------------------
Vic Luo
Shanghai Jiaotong University
Key fingerprint 0x98809ca08bf5662a

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