\documentclass[a4paper]{article}
\usepackage{german}
\usepackage[utf8]{inputenc}

\usepackage{pgfplots}
\usepackage{pgfplots.assert}


% this here loads compatibility code...
\usetikzlibrary{fillbetween}
% ... although we only need this:
%\usetikzlibrary{intersections}

\begin{document}

\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
	\draw[name path=A] plot coordinates {
		(0,0) (1,1) (2,0) 
	};

	\draw[name path=B] (1,-1) -- (1,1);

	\pgfintersectionofpaths%
		{%
			\expandafter\pgfsetpath\csname tikz@intersect@path@name@A\endcsname%
		}%
		{%
			\expandafter\pgfsetpath\csname tikz@intersect@path@name@B\endcsname%
		}%

	\pgfplotsassertequalstok{1}{\pgfintersectionsolutions}{}

	\foreach \i in {1,...,\pgfintersectionsolutions} {%
		\begingroup
		\pgftransformshift{\pgfpointintersectionsolution{\i}}%
		\node at (0,0) {\i};
		\endgroup
	}%

	\pgfintersectiongetsolutionsegmentindices{1}\Aindex\Bindex
	\pgfplotsassertequalstok{0}{\Aindex}{solution 1 path A}
	\pgfplotsassertequalstok{0}{\Bindex}{solution 1 path B}
	

\end{tikzpicture}
\end{document}

