is there any significance of making a variable and function inline and static inside a namespace. For example consider following 2 files:
consider first header file
// header1.h
#include <string>
#include <iostream>
namespace First
{
static inline std::string s {"hi"};
static inline void print(std::string str)
{
std::cout << str << std::end;
}
}
and consider following second header file
// header2.h
#include <string>
#include <iostream>
namespace Second
{
std::string s {"hi"};
void print(std::string str)
{
std::cout << str << std::end;
}
}
Does compiler see two codes differently or they introduce similar behavior ?