Question: I am having an API that will give more then 100 id as responses, but I need to pass this response as an body to anther API where it will take only 100 id as request body, I need to split these responses and send it in batches to another API, can anyone please help me to split these response to 100 and send it over to another.

Service class-

```
Workspaces workspace = new Workspaces(mw);
Flux<Workspaces> modifiedWorkspace = webClient.post().uri(URIDetails.MODIFIEDWORKSPACE)
.header("Authorization", bearerToken).body(Mono.just(mw), Workspaces.class).retrieve()
.bodyToFlux(Workspaces.class);
modifiedWorkspace.doOnNext(System.out::println).blockLast();
return null;

```

Workspaces model-

```
public class Workspaces {
private List<String> workspaces;
}

```

Main call-

```
Flux<ScanIDModel> modifiedWorkspaces;
final List<String> mw = new ArrayList<>();
for (Workspace w : modifiedWorkspaces) {
mw.add(w.getId());
}
modifiedWorkspaces = scanRespone(mw);

```

JSON BODY :

```
{
"workspaces": [
"6eret123",
"b129078v",
"ngy66553",
"erfc1153"
]
}

```

How can I Iterate it over and split the response in here. Please help me over to resolve this.
Thanks in advance

Answer: 
Usually people use macros to append `__LINE__` to the declaration to allow for multiple declarations in one scope block.

Prior to C++20 this was impossible without macros. C++20 and later, with a little work, can use [`std::source_location`](https://en.cppreference.com/w/cpp/utility/source_location).

Jason Turner has a video on it in his C++ weekly video series [here](https://www.youtube.com/watch?v=TAS85xmNDEc)
I was initially not sure to grasp the advantage of that macro, apart hiding the timer instance name (and cause possible conflicts).
But I think that the intent could be to have the possibility to do this:

```
#ifdef _DEBUG
  #define SCOPED_TIMER(slot) ScopedTimer __scopedTimer( slot );
#else
  #define SCOPED_TIMER(slot) ;
#endif

```

That would indeed save some keystrokes; otherwise, if the timing takes place also in release builds, I would simply use directly the macro definition; either way, I would get rid of the initial underscores in the object name (that are conventionally reserved for compiler implementers):

```
ScopedTimer scoped_timer( some_magic_slot_number );

```