Öö Tiib
unread,Mar 5, 2015, 7:44:42 PM3/5/15You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
On Friday, 6 March 2015 02:06:22 UTC+2, Stefan Ram wrote:
> Sorry, I have tried to search for »scope« in the C++
> specification, but there are very many hits, and I gave up!
>
> Maybe some reader already knows the answer:
>
> It seems that the scope of »i« begins at the place
> of the comment in the following program.
Yes.
> constexpr int f( int const * const p ){ return 2; }
> int main(){ constexpr int i/**/{ f( &i ) }; }
>
> Now, I would like to know the location in the C++
> specification where this is specified.
[basic.scope.block] Says that scope of your i starts from
"point of declaration".
[basic.scope.pdecl] tells that the "point of declaration"
of your i is immediately after it and before its initializer.