Boost Foreach needs to know how long the sequence is. Currently there's no way of telling where your LETTERS array ends.
It can iterate over C-style strings. However, your { 'A', 'B' } is not null-terminated. So the following should also work, since it now knows how large your array is:
const char LETTERS[] = { 'A', 'B', '\0' };
BOOST_FOREACH( char letter, LETTERS ) {
// ...
}
This should also work:
std::string LETTERS( "AB" );
BOOST_FOREACH( char letter, LETTERS ) {
// ...
}