1

Do constexpr functions have internal linkage by default or external?
Take for example the following function:

constexpr int foo() {
    return 0;
}
eyelash
  • 2,640
  • 23
  • 31

1 Answers1

1

A constexpr specifier used in a function or static member variable (since C++17) declaration implies inline.

from cppreference

Vittorio Romeo
  • 86,944
  • 30
  • 238
  • 393
  • Being inline is a separate thing (inline functions have external linkage by default, just like any other free function, but they can have internal linkage as well (e.g. if declared static)) – ricab Jan 07 '18 at 20:40