rippled
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
xrpl::test::jtx::WithSourceLocation< T > Struct Template Reference

Wrapper that captures std::source_location when implicitly constructed. More...

#include <Env.h>

Collaboration diagram for xrpl::test::jtx::WithSourceLocation< T >:
Collaboration graph
[legend]

Public Member Functions

 WithSourceLocation (T v, std::source_location l=std::source_location::current())
 

Public Attributes

value
 
std::source_location loc
 

Detailed Description

template<class T>
struct xrpl::test::jtx::WithSourceLocation< T >

Wrapper that captures std::source_location when implicitly constructed.

This solves the problem of combining std::source_location with variadic templates. The std::source_location default argument is evaluated at the call site when the wrapper is constructed via implicit conversion.

This is a template struct that holds the value directly, allowing implicit conversion without template argument deduction issues via CTAD.

Definition at line 55 of file Env.h.

Constructor & Destructor Documentation

◆ WithSourceLocation()

template<class T >
xrpl::test::jtx::WithSourceLocation< T >::WithSourceLocation ( v,
std::source_location  l = std::source_location::current() 
)

Definition at line 62 of file Env.h.

Member Data Documentation

◆ value

template<class T >
T xrpl::test::jtx::WithSourceLocation< T >::value

Definition at line 57 of file Env.h.

◆ loc

Definition at line 58 of file Env.h.