aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-23 14:08:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-23 14:08:47 +0200
commitbb15620bcf2c6dec409719f8be27c62696b692d8 (patch)
tree69171cc057f68610e63ca07e7a9cf75d680a8468 /libbutl/filesystem.cxx
parent23a168e7889cb9219575cfb8f78521bcab45605c (diff)
Make some functions static
This works around an assertion in a modularized build with Clang.
Diffstat (limited to 'libbutl/filesystem.cxx')
-rw-r--r--libbutl/filesystem.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx
index da2f12c..fd9ba75 100644
--- a/libbutl/filesystem.cxx
+++ b/libbutl/filesystem.cxx
@@ -468,21 +468,21 @@ namespace butl
// so use the second argument to not end up with the same signatures.
//
template <typename S>
- inline constexpr auto
+ static inline constexpr auto
mnsec (const S* s, bool) -> decltype(s->st_mtim.tv_nsec)
{
return s->st_mtim.tv_nsec; // POSIX (GNU/Linux, Solaris).
}
template <typename S>
- inline constexpr auto
+ static inline constexpr auto
mnsec (const S* s, int) -> decltype(s->st_mtimespec.tv_nsec)
{
return s->st_mtimespec.tv_nsec; // *BSD, MacOS.
}
template <typename S>
- inline constexpr auto
+ static inline constexpr auto
mnsec (const S* s, float) -> decltype(s->st_mtime_n)
{
return s->st_mtime_n; // AIX 5.2 and later.
@@ -492,32 +492,32 @@ namespace butl
// let's make it a compile error.
//
// template <typename S>
- // inline constexpr int
+ // static inline constexpr int
// mnsec (...) {return 0;}
template <typename S>
- inline constexpr auto
+ static inline constexpr auto
ansec (const S* s, bool) -> decltype(s->st_atim.tv_nsec)
{
return s->st_atim.tv_nsec; // POSIX (GNU/Linux, Solaris).
}
template <typename S>
- inline constexpr auto
+ static inline constexpr auto
ansec (const S* s, int) -> decltype(s->st_atimespec.tv_nsec)
{
return s->st_atimespec.tv_nsec; // *BSD, MacOS.
}
template <typename S>
- inline constexpr auto
+ static inline constexpr auto
ansec (const S* s, float) -> decltype(s->st_atime_n)
{
return s->st_atime_n; // AIX 5.2 and later.
}
// template <typename S>
- // inline constexpr int
+ // static inline constexpr int
// ansec (...) {return 0;}
void
@@ -813,7 +813,8 @@ namespace butl
}
template <typename D>
- inline /*constexpr*/ entry_type d_type (const D* d, decltype(d->d_type)*)
+ static inline /*constexpr*/ entry_type
+ d_type (const D* d, decltype(d->d_type)*)
{
switch (d->d_type)
{
@@ -845,7 +846,8 @@ namespace butl
}
template <typename D>
- inline constexpr entry_type d_type (...) {return entry_type::unknown;}
+ static inline constexpr entry_type
+ d_type (...) {return entry_type::unknown;}
void dir_iterator::
next ()