Why are std::source_location's getters not marked as [[nodiscard]]?

44 Views Asked by At

According to: https://en.cppreference.com/w/cpp/utility/source_location

the getters aren't marked as [[nodiscard]].

    constexpr uint_least32_t line() const noexcept;
    constexpr uint_least32_t column() const noexcept;
    constexpr const char* file_name() const noexcept;
    constexpr const char* function_name() const noexcept;

Is there a reason for this? Do they have an effect when called other than the return value?

0

There are 0 best solutions below