다른cpp프로젝트소스 구경하다보니 [&]연산자가 있던데

정확한 정의나 설명된곳 주소를 알고계신분은 도움바랍니다.

구글검색으로 안되네요.


    pImpl->ForEachGlyph(text, [&](Glyph const* glyph, float x, float y)
    {
        float w = (float)(glyph->Subrect.right - glyph->Subrect.left);
        float h = (float)(glyph->Subrect.bottom - glyph->Subrect.top) + glyph->YOffset;

        h = std::max(h, pImpl->lineSpacing);

        result = XMVectorMax(result, XMVectorSet(x + w, y + h, 0, 0));
    });


문맥을 보면 무슨뜻인지는 알겠는데, 정확한 정의를 모르겠습니다.

잘모르시는 분들은 아래함수를 보시면 문맥흐름은 알수있을겁니다...


// The core glyph layout algorithm, shared between DrawString and MeasureString.
template<typename TAction>
void SpriteFont::Impl::ForEachGlyph(_In_z_ wchar_t const* text, TAction action)
{
    float x = 0;
    float y = 0;

    for (; *text; text++)
    {
        wchar_t character = *text;

        switch (character)
        {
            case '\r':
                // Skip carriage returns.
                continue;

            case '\n':
                // New line.
                x = 0;
                y += lineSpacing;
                break;

            default:
                // Output this character.
                auto glyph = FindGlyph(character);

                x += glyph->XOffset;

                if (x < 0)
                    x = 0;

                if ( !iswspace(character)
                     || ( ( glyph->Subrect.right - glyph->Subrect.left ) > 1 )
                     || ( ( glyph->Subrect.bottom - glyph->Subrect.top ) > 1 ) )
                {
                    action(glyph, x, y);
                }

                x += glyph->Subrect.right - glyph->Subrect.left + glyph->XAdvance;
                break;
        }
    }
}


답변주신분들 감사드립니다.