Skip to content

Commit 076fc38

Browse files
committed
Merge remote-tracking branch 'github/develop' into develop
2 parents 20c06c7 + 1e51721 commit 076fc38

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ project(
66
${CODIPACK_NAME}
77
VERSION ${CODIPACK_VERSION}
88
DESCRIPTION "CoDiPack - Code Differentiation Package"
9-
HOMEPAGE_URL "http://scicomp.rptu.de/software/codi")
9+
HOMEPAGE_URL "http://scicomp.rptu.de/software/codi"
10+
LANGUAGES CXX)
1011

1112
add_library(${PROJECT_NAME} INTERFACE)
1213

include/codi/expressions/complex/stdComplex.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,31 @@ namespace codi {
199199

200200
return *this;
201201
}
202+
203+
#if CODI_HasCpp20
204+
using Base::real;
205+
206+
template<typename Arg>
207+
void real(ExpressionInterface<InnerReal, Arg> const& arg) {
208+
Base::values[0] = arg;
209+
}
210+
211+
void real(InnerReal const& arg) {
212+
Base::values[0] = arg;
213+
}
214+
215+
using Base::imag;
216+
217+
template<typename Arg>
218+
void imag(ExpressionInterface<InnerReal, Arg> const& arg) {
219+
Base::values[1] = arg;
220+
}
221+
222+
void imag(InnerReal const& arg) {
223+
Base::values[1] = arg;
224+
}
225+
226+
#endif
202227
};
203228

204229
namespace RealTraits {

0 commit comments

Comments
 (0)