1

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

constexpr int foo() {
    return 0;
}
eyelash
  • 3,197
  • 25
  • 33

1 Answers1

1

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

from cppreference

Vittorio Romeo
  • 90,666
  • 33
  • 258
  • 416
  • 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