Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
constexpr internal error
#include <iostream> class StringView { public: constexpr StringView(const char* start_, const char* end_): start(start_), end(end_) {} constexpr uintptr_t Length() const {return end-start;} //internal compiler error private: const char* start; const char* end; }; int main() { constexpr const char* const str = "Test string"; enum: uintptr_t {LENGTH = StringView(str, str + 5).Length()}; std::cout << LENGTH << std::endl; return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
MSVC C2888 bug
Is min defined?
#30.1
boost::synchronize
#7.2
#21
assignment
This is the first one
MSVC bug in __fastcall implementation !!!
Compile time creation of class member stl container (const std::array) filled with elements.
Please log in to post a comment.