hpx/assertion/source_location.hpp#

See Public API for a list of names and headers that are part of the public HPX API.

Defines

HPX_CURRENT_SOURCE_LOCATION()#
namespace hpx

Functions

std::ostream &operator<<(std::ostream &os, source_location const &loc)#
struct source_location#
#include <source_location.hpp>

This contains the location information where HPX_ASSERT has been called The source_location class represents certain information about the source code, such as file names, line numbers, and function names. Previously, functions that desire to obtain this information about the call site (for logging, testing, or debugging purposes) must use macros so that predefined macros like and are expanded in the context of the caller. The source_location class provides a better alternative. source_location meets the DefaultConstructible, CopyConstructible, CopyAssignable and Destructible requirements. Lvalue of source_locationmeets the Swappable requirement. Additionally, the following conditions are true:

  • std::is_nothrow_move_constructible_v<std::source_location> 
    

  • std::is_nothrow_move_assignable_v<std::source_location> 
    

  • std::is_nothrow_swappable_v<std::source_location> 
    
    It is intended that source_location has a small size and can be copied efficiently. It is unspecified whether the copy/move constructors and the copy/move assignment operators of source_location are trivial and/or constexpr.

Public Functions

inline constexpr std::uint_least32_t line() const noexcept#

return the line number represented by this object

inline constexpr std::uint_least32_t column() const noexcept#

return the column number represented by this object

inline constexpr const char *file_name() const noexcept#

return the file name represented by this object

inline constexpr const char *function_name() const noexcept#

return the name of the function represented by this object, if any

Public Members

const char *filename#
std::uint_least32_t line_number#
const char *functionname#
namespace assertion

Typedefs

using instead = hpx::source_location#