diff --git a/README.md b/README.md index 2cc5626..63c2c8c 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ consteval double parse(std::string_view input) { // This function should compile to a function which // merely returns 3.1415. -double constexptest() { +constexpr double constexptest() { return parse("3.1415 input"); } ``` diff --git a/tests/example_test.cpp b/tests/example_test.cpp index cb9be38..91437de 100644 --- a/tests/example_test.cpp +++ b/tests/example_test.cpp @@ -54,7 +54,7 @@ consteval double parse(std::string_view input) { // This function should compile to a function which // merely returns 3.1415. -double constexptest() { +constexpr double constexptest() { return parse("3.1415 input"); } #endif