Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

access past the end 1

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.72 sec, absolute service time: 0,91 sec 
edit mode |  history
Error(s):
1251009532/source.cpp:10:30: error: constexpr variable 'diff' must be initialized by a constant expression
    constexpr std::ptrdiff_t diff = *(&arr + 1) - arr;
                             ^      ~~~~~~~~~~~~~~~~~
1251009532/source.cpp:10:37: note: cannot access array element of pointer past the end of object
    constexpr std::ptrdiff_t diff = *(&arr + 1) - arr;
                                    ^
1 error generated.

        

    
                
λ
.NET NoSQL database for rapid development